2023-01-24 20:24:46 +02:00
|
|
|
import 'package:cake_wallet/core/address_validator.dart';
|
2022-03-15 10:11:53 +01:00
|
|
|
import 'package:cake_wallet/core/yat_service.dart';
|
2023-09-25 09:47:39 -04:00
|
|
|
import 'package:cake_wallet/entities/ens_record.dart';
|
2021-07-07 16:50:55 +03:00
|
|
|
import 'package:cake_wallet/entities/openalias_record.dart';
|
2021-07-07 17:31:16 +03:00
|
|
|
import 'package:cake_wallet/entities/parsed_address.dart';
|
2021-07-07 16:50:55 +03:00
|
|
|
import 'package:cake_wallet/entities/unstoppable_domain_address.dart';
|
2022-03-15 10:11:53 +01:00
|
|
|
import 'package:cake_wallet/entities/emoji_string_extension.dart';
|
2025-01-15 17:03:30 -05:00
|
|
|
import 'package:cake_wallet/entities/wellknown_record.dart';
|
Zano with passphrase (#1971)
* CW-685 Add passphrase restore for xmr/wow (#1552)
* CW-685 Add passphrase restore for xmr/wow
* add support for polyseed passphrase
* disable 14 word seed passphrase (not supported in wownero-seed)
fix: Getting grayed screen on latest passphrase build after having restored a 14-word wownero seed (+passphrase) and attempting to restore a XMR seed, legacy or otherwise.
* fix pointer when restoring depracated wownero seed
* Fix polyseed encryption
* changes from review
* remove unused code
* add passphrase back to the screen
add passphrase to qr code backup export
* fix settings leaking through currencies on seed restore
* fix monero.com builds, make passphrase a getter on WalletBase
* add support for weird polyseed
* store passphrase for weird polyseed
* show encrypted seed only when passphrase is not empty
* force set restore height
* fix build issues
* fix build errors
* fix configure script
* print -> printV
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update tool/configure.dart [skip ci]
* Update lib/view_model/wallet_new_vm.dart
* reuse existing passphrase field
* remove unused passphrase field
* make workflow run on pullrequests only [skip ci] [skip slack]
---------
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* Zano (#1793)
* my experiments
* Inital code for Zano integration
* Added missing android log lib
* added dummy wallet & some zano implementation
* fixing api for zano
* fixed zano build script
* attempt tp fix namespace problem
* added copy script for Zano files
* changes for zano wallet
* last updates
* zano.dart test app
* wallet recovery
* added pending transfer, some cleanup of unused
* some cleanup
* send + receive qr code
* last upd
* updated build_zano.sh
* updated zano ApiCalls, removed dummy
* updated zano ApiCalls, removed dummy
* added logging for get status/get info
* restored old wallet.dart
* restoring original versions of files
* restoring original versions of files
* restored get_height_by_date.dart, removed unnecessary calls for zano get height
* restoring original versions
* added multiple destinations, send all flag; some refactoring
* logging
* removed the duplicate
* fixed syncing sync status, decimal division, safe null json parsing
* some fixes after merge
* added multibalance/asset support for zano (ui)
* adding/removing from whitelist
* transfers in different assets
* transfers for multiple destinations and send all, some refactoring
* whitelists, some refactoring
* added different digits (decimal points) for formatters, some refactoring
* open, create, restore wallet refactoring; whitelists
* whitelists
* getting and updating transaction list; restoring a wallet from QR code
* several attempts to close wallet
* some refactoring
* added seed phrase
* changed fields to BigInt, some fixes
* modified build scripts for android
* build scripts
* restored accidently removed cw_haven.dart
* inital ios integration(zano libs built)
* update in script
* latest changes
* Applied a patch for iOS build (Boost and Zano scripts)
* Removed zano.dart (script-generated) and some unnecessary files
* Revert "Removed zano.dart (script-generated) and some unnecessary files"
This reverts commit 367c86398ef2616006a2cbd2339ef2f30ed2800e.
* Removed zano.dart (generated by scripts), some files restored to initial versions
* added timer library
* changed paths in build_zano.sh
* build_zano.sh
* edit_token_page.dart - removed flag skipZanoAddressValidation
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* lib/core/address_validator.dart - updated zano address regex
lib/src/screens/dashboard/edit_token_page.dart - using AddressValidator().call
* fix zano build issues on android
* remove contrib/depends to save space
* move async call to a synchronouse one
* call sync call in isolate to make it async
generate framework for iOS as well
fix UR issues
* zano changes from monero_c repo
* update monero_c hash
* fix invalid zano imports, add support for linux, speed up CI builds
* update monero_c hash
* bump monero_c commit (yes, again, I know)
* fix wallet resttore, fix hardcoded IP
* fix regex, don't throw error when opening wallet, fix tx history, fix async calls, move stuff to isolate
* fix api calls in async transaction creation
* update build scripts
* fix some build issues
* update dependencies
* fix dependencies
* update ci scripts
* Improve multithread use of zano api
* Fix build issue
* fix zano node selection, move other zano calls to separate isolate
* update moneroc hash
WIP fixes for zano
* update monero_c
* fix monero.com builds
* sync wallet after connecting
* update monero_c
* Fix windows builds
* update monero_c
* update monero_c
* unshallow submodule
* cherry pick CW-867 Wownero fixes (#1881)
* fix wownero syntax error
* remove print statements in zano
* update zano node URL
* [PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)
* drop env -i to fix cmake build errors on newer system
* [skip ci] Revert "[PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)"
This reverts commit 5acb5bfe57c4b2aeb7aa40bd684a3319a68f98bc.
* [run tests] [skip slack] Fix env in build
* Dynamically detect number of cores used to build monero_c, since it appears that zano requires more memory to link (and it reliably fails for first couple builds due to OOM on CI/VM with memory constrains).
Drop unshallowing of all modules
[run tests]
* Changes from review [run tests]
* drop zano on linux (missing symbols)
fix wownero on linux
add aarch64-linux-gnu
[run tests]
* - remove duplicate entry in addToken()
- use walletPassword in createZanoNewWalletCredentials
- remove createZanoRestoreWalletFromKeysCredentials
[run tests]
* [skip ci] update dockerfile
* fix parameter issue
---------
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* - Add Zano Aliases
- Enable simpleswap [skip ci]
- Fix settings migration versions
* push missing file [skip ci]
* Zano pr with CW-685 passphrase (#1969)
* my experiments
* Inital code for Zano integration
* Added missing android log lib
* added dummy wallet & some zano implementation
* fixing api for zano
* fixed zano build script
* attempt tp fix namespace problem
* added copy script for Zano files
* changes for zano wallet
* last updates
* zano.dart test app
* wallet recovery
* added pending transfer, some cleanup of unused
* some cleanup
* send + receive qr code
* last upd
* updated build_zano.sh
* updated zano ApiCalls, removed dummy
* updated zano ApiCalls, removed dummy
* added logging for get status/get info
* restored old wallet.dart
* restoring original versions of files
* restoring original versions of files
* restored get_height_by_date.dart, removed unnecessary calls for zano get height
* restoring original versions
* added multiple destinations, send all flag; some refactoring
* logging
* removed the duplicate
* fixed syncing sync status, decimal division, safe null json parsing
* some fixes after merge
* added multibalance/asset support for zano (ui)
* adding/removing from whitelist
* transfers in different assets
* transfers for multiple destinations and send all, some refactoring
* whitelists, some refactoring
* added different digits (decimal points) for formatters, some refactoring
* open, create, restore wallet refactoring; whitelists
* whitelists
* getting and updating transaction list; restoring a wallet from QR code
* several attempts to close wallet
* some refactoring
* added seed phrase
* CW-685 Add passphrase restore for xmr/wow
* add support for polyseed passphrase
* disable 14 word seed passphrase (not supported in wownero-seed)
fix: Getting grayed screen on latest passphrase build after having restored a 14-word wownero seed (+passphrase) and attempting to restore a XMR seed, legacy or otherwise.
* fix pointer when restoring depracated wownero seed
* Fix polyseed encryption
* changed fields to BigInt, some fixes
* modified build scripts for android
* build scripts
* restored accidently removed cw_haven.dart
* inital ios integration(zano libs built)
* update in script
* latest changes
* changes from review
* remove unused code
* add passphrase back to the screen
add passphrase to qr code backup export
* fix settings leaking through currencies on seed restore
* fix monero.com builds, make passphrase a getter on WalletBase
* add support for weird polyseed
* store passphrase for weird polyseed
* show encrypted seed only when passphrase is not empty
* force set restore height
* Applied a patch for iOS build (Boost and Zano scripts)
* Removed zano.dart (script-generated) and some unnecessary files
* Revert "Removed zano.dart (script-generated) and some unnecessary files"
This reverts commit 367c86398ef2616006a2cbd2339ef2f30ed2800e.
* Removed zano.dart (generated by scripts), some files restored to initial versions
* fix build issues
* fix build errors
* added timer library
* changed paths in build_zano.sh
* build_zano.sh
* edit_token_page.dart - removed flag skipZanoAddressValidation
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* lib/core/address_validator.dart - updated zano address regex
lib/src/screens/dashboard/edit_token_page.dart - using AddressValidator().call
* fix zano build issues on android
* remove contrib/depends to save space
* move async call to a synchronouse one
* call sync call in isolate to make it async
generate framework for iOS as well
fix UR issues
* zano changes from monero_c repo
* update monero_c hash
* fix invalid zano imports, add support for linux, speed up CI builds
* update monero_c hash
* bump monero_c commit (yes, again, I know)
* fix wallet resttore, fix hardcoded IP
* fix regex, don't throw error when opening wallet, fix tx history, fix async calls, move stuff to isolate
* fix api calls in async transaction creation
* fix configure script
* update build scripts
* fix some build issues
* update dependencies
* fix dependencies
* update ci scripts
* Improve multithread use of zano api
* Fix build issue
* fix zano node selection, move other zano calls to separate isolate
* update moneroc hash
WIP fixes for zano
* update monero_c
* fix monero.com builds
* sync wallet after connecting
* update monero_c
* Fix windows builds
* update monero_c
* print -> printV
* update monero_c
* unshallow submodule
* cherry pick CW-867 Wownero fixes (#1881)
* fix wownero syntax error
* remove print statements in zano
* update zano node URL
* [PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)
* drop env -i to fix cmake build errors on newer system
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update tool/configure.dart [skip ci]
* Update lib/view_model/wallet_new_vm.dart
* [skip ci] Revert "[PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)"
This reverts commit 5acb5bfe57c4b2aeb7aa40bd684a3319a68f98bc.
* [run tests] [skip slack] Fix env in build
* Dynamically detect number of cores used to build monero_c, since it appears that zano requires more memory to link (and it reliably fails for first couple builds due to OOM on CI/VM with memory constrains).
Drop unshallowing of all modules
[run tests]
* Changes from review [run tests]
* drop zano on linux (missing symbols)
fix wownero on linux
add aarch64-linux-gnu
[run tests]
* - remove duplicate entry in addToken()
- use walletPassword in createZanoNewWalletCredentials
- remove createZanoRestoreWalletFromKeysCredentials
[run tests]
* [skip ci] update dockerfile
* reuse existing passphrase field
* add passphrase support for zano
* Drop aarch64-linux-gnu for now.
* fix passphrase display, fix gray screen
* catch errors in polyseed encryption, encrypt only polyseed, fix coin in wownero
* update monero_c
update wownero to 0.11.3.0
* Show passphrase only when non-empty, fix passphrase being displayed as view key private.
* fix NanoAccountListPage showing up instead of MoneroAccountListPage for wownero
* build zano dependencies on android
* fix parameter issue
* minor merge leftover [skip ci]
* minor cleanup [skip ci]
* fix zano alias
update eth url for ens lookup
change $MAKE_JOB_COUNT to $NPROC
* minor cleanup [skip ci]
* fix zano alias
* Disable passphrase for creation of xmr/wow/zano
minor fixes
* fix zano on iOS
* - Fix get token data
- Enable unavailable balance
- Enable confirmations count
- Adjust explorer link
---------
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
---------
Co-authored-by: cyan <cyjan@mrcyjanek.net>
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
2025-01-24 20:33:24 +02:00
|
|
|
import 'package:cake_wallet/entities/zano_alias.dart';
|
2024-05-06 22:16:25 +03:00
|
|
|
import 'package:cake_wallet/exchange/provider/thorchain_exchange.provider.dart';
|
2023-10-05 15:18:35 +03:00
|
|
|
import 'package:cake_wallet/mastodon/mastodon_api.dart';
|
2024-01-27 04:34:38 +02:00
|
|
|
import 'package:cake_wallet/nostr/nostr_api.dart';
|
2023-11-03 21:23:11 +02:00
|
|
|
import 'package:cake_wallet/store/settings_store.dart';
|
2023-01-24 20:24:46 +02:00
|
|
|
import 'package:cake_wallet/twitter/twitter_api.dart';
|
|
|
|
import 'package:cw_core/crypto_currency.dart';
|
2024-12-09 12:23:59 -06:00
|
|
|
import 'package:cw_core/utils/print_verbose.dart';
|
2023-10-03 10:55:38 -04:00
|
|
|
import 'package:cw_core/wallet_base.dart';
|
2022-06-28 18:46:32 +03:00
|
|
|
import 'package:cw_core/wallet_type.dart';
|
2022-06-13 14:41:46 +03:00
|
|
|
import 'package:cake_wallet/entities/fio_address_provider.dart';
|
2024-01-27 04:34:38 +02:00
|
|
|
import 'package:flutter/cupertino.dart';
|
2022-03-15 10:11:53 +01:00
|
|
|
|
2025-02-17 23:05:44 +02:00
|
|
|
import 'bip_353_record.dart';
|
|
|
|
|
2022-03-15 10:11:53 +01:00
|
|
|
class AddressResolver {
|
2023-11-03 21:23:11 +02:00
|
|
|
AddressResolver({required this.yatService, required this.wallet, required this.settingsStore})
|
|
|
|
: walletType = wallet.type;
|
2023-01-31 21:39:08 +02:00
|
|
|
|
2022-03-15 10:11:53 +01:00
|
|
|
final YatService yatService;
|
2022-06-28 18:46:32 +03:00
|
|
|
final WalletType walletType;
|
2023-10-03 20:07:05 +03:00
|
|
|
final WalletBase wallet;
|
2023-11-03 21:23:11 +02:00
|
|
|
final SettingsStore settingsStore;
|
2023-01-24 20:24:46 +02:00
|
|
|
|
2022-03-15 10:11:53 +01:00
|
|
|
static const unstoppableDomains = [
|
2024-11-25 18:26:41 +02:00
|
|
|
"888",
|
2025-02-28 19:55:22 +02:00
|
|
|
"academy",
|
|
|
|
"agency",
|
2024-11-25 18:26:41 +02:00
|
|
|
"altimist",
|
|
|
|
"anime",
|
|
|
|
"austin",
|
|
|
|
"bald",
|
2025-02-28 19:55:22 +02:00
|
|
|
"bay",
|
2024-11-25 18:26:41 +02:00
|
|
|
"benji",
|
|
|
|
"bet",
|
|
|
|
"binanceus",
|
|
|
|
"bitcoin",
|
|
|
|
"bitget",
|
2025-02-28 19:55:22 +02:00
|
|
|
"bitscrunch",
|
2024-11-25 18:26:41 +02:00
|
|
|
"blockchain",
|
2025-02-28 19:55:22 +02:00
|
|
|
"boomer",
|
|
|
|
"boston",
|
2024-11-25 18:26:41 +02:00
|
|
|
"ca",
|
2025-02-28 19:55:22 +02:00
|
|
|
"caw",
|
|
|
|
"cc",
|
|
|
|
"chat",
|
2024-11-25 18:26:41 +02:00
|
|
|
"chomp",
|
|
|
|
"clay",
|
2025-02-28 19:55:22 +02:00
|
|
|
"club",
|
2024-11-25 18:26:41 +02:00
|
|
|
"co",
|
|
|
|
"com",
|
2025-02-28 19:55:22 +02:00
|
|
|
"company",
|
2024-11-25 18:26:41 +02:00
|
|
|
"crypto",
|
|
|
|
"dao",
|
2025-02-28 19:55:22 +02:00
|
|
|
"design",
|
2024-11-25 18:26:41 +02:00
|
|
|
"dfz",
|
|
|
|
"digital",
|
2025-02-28 19:55:22 +02:00
|
|
|
"doga",
|
|
|
|
"donut",
|
2024-11-25 18:26:41 +02:00
|
|
|
"dream",
|
2025-02-28 19:55:22 +02:00
|
|
|
"email",
|
|
|
|
"emir",
|
2024-11-25 18:26:41 +02:00
|
|
|
"eth",
|
|
|
|
"ethermail",
|
2025-02-28 19:55:22 +02:00
|
|
|
"family",
|
2024-11-25 18:26:41 +02:00
|
|
|
"farms",
|
2025-02-28 19:55:22 +02:00
|
|
|
"finance",
|
2024-11-25 18:26:41 +02:00
|
|
|
"fun",
|
2025-02-28 19:55:22 +02:00
|
|
|
"fyi",
|
|
|
|
"games",
|
|
|
|
"global",
|
2024-11-25 18:26:41 +02:00
|
|
|
"go",
|
|
|
|
"group",
|
2025-02-28 19:55:22 +02:00
|
|
|
"guru",
|
2024-11-25 18:26:41 +02:00
|
|
|
"hi",
|
2025-02-28 19:55:22 +02:00
|
|
|
"hockey",
|
2024-11-25 18:26:41 +02:00
|
|
|
"host",
|
|
|
|
"info",
|
|
|
|
"io",
|
|
|
|
"klever",
|
|
|
|
"kresus",
|
|
|
|
"kryptic",
|
|
|
|
"lfg",
|
|
|
|
"life",
|
|
|
|
"live",
|
2025-02-28 19:55:22 +02:00
|
|
|
"llc",
|
|
|
|
"ltc",
|
2024-11-25 18:26:41 +02:00
|
|
|
"ltd",
|
|
|
|
"manga",
|
2025-02-28 19:55:22 +02:00
|
|
|
"me",
|
|
|
|
"media",
|
2024-11-25 18:26:41 +02:00
|
|
|
"metropolis",
|
2025-02-28 19:55:22 +02:00
|
|
|
"miami",
|
|
|
|
"miku",
|
|
|
|
"money",
|
2024-11-25 18:26:41 +02:00
|
|
|
"moon",
|
|
|
|
"mumu",
|
|
|
|
"net",
|
2025-02-28 19:55:22 +02:00
|
|
|
"network",
|
|
|
|
"news",
|
2024-11-25 18:26:41 +02:00
|
|
|
"nft",
|
2025-02-28 19:55:22 +02:00
|
|
|
"npc",
|
|
|
|
"onchain",
|
2024-11-25 18:26:41 +02:00
|
|
|
"online",
|
|
|
|
"org",
|
2025-02-28 19:55:22 +02:00
|
|
|
"podcast",
|
2024-11-25 18:26:41 +02:00
|
|
|
"pog",
|
|
|
|
"polygon",
|
|
|
|
"press",
|
2025-02-28 19:55:22 +02:00
|
|
|
"privacy",
|
2024-11-25 18:26:41 +02:00
|
|
|
"pro",
|
|
|
|
"propykeys",
|
|
|
|
"pudgy",
|
|
|
|
"pw",
|
2025-02-28 19:55:22 +02:00
|
|
|
"quantum",
|
|
|
|
"rad",
|
2024-11-25 18:26:41 +02:00
|
|
|
"raiin",
|
2025-02-28 19:55:22 +02:00
|
|
|
"retardio",
|
|
|
|
"rip",
|
|
|
|
"rocks",
|
2024-11-25 18:26:41 +02:00
|
|
|
"secret",
|
2025-02-28 19:55:22 +02:00
|
|
|
"services",
|
2024-11-25 18:26:41 +02:00
|
|
|
"site",
|
|
|
|
"smobler",
|
2025-02-28 19:55:22 +02:00
|
|
|
"social",
|
|
|
|
"solutions",
|
2024-11-25 18:26:41 +02:00
|
|
|
"space",
|
|
|
|
"stepn",
|
|
|
|
"store",
|
2025-02-28 19:55:22 +02:00
|
|
|
"studio",
|
|
|
|
"systems",
|
2024-11-25 18:26:41 +02:00
|
|
|
"tball",
|
2025-02-28 19:55:22 +02:00
|
|
|
"tea",
|
|
|
|
"team",
|
2024-11-25 18:26:41 +02:00
|
|
|
"tech",
|
2025-02-28 19:55:22 +02:00
|
|
|
"technology",
|
|
|
|
"today",
|
|
|
|
"tribe",
|
|
|
|
"u",
|
2024-11-25 18:26:41 +02:00
|
|
|
"ubu",
|
|
|
|
"uno",
|
|
|
|
"unstoppable",
|
2025-02-28 19:55:22 +02:00
|
|
|
"vip",
|
2024-11-25 18:26:41 +02:00
|
|
|
"wallet",
|
|
|
|
"website",
|
2025-02-28 19:55:22 +02:00
|
|
|
"wif",
|
2024-11-25 18:26:41 +02:00
|
|
|
"wifi",
|
|
|
|
"witg",
|
2025-02-28 19:55:22 +02:00
|
|
|
"work",
|
|
|
|
"world",
|
2024-11-25 18:26:41 +02:00
|
|
|
"wrkx",
|
2025-02-28 19:55:22 +02:00
|
|
|
"wtf",
|
2024-11-25 18:26:41 +02:00
|
|
|
"x",
|
|
|
|
"xmr",
|
|
|
|
"xyz",
|
|
|
|
"zil",
|
2025-02-28 19:55:22 +02:00
|
|
|
"zone"
|
2023-01-31 21:39:08 +02:00
|
|
|
];
|
2021-07-07 16:50:55 +03:00
|
|
|
|
2025-06-18 16:20:03 +02:00
|
|
|
static String? extractAddressByType(
|
|
|
|
{required String raw,
|
|
|
|
required CryptoCurrency type,
|
|
|
|
bool requireSurroundingWhitespaces = true}) {
|
|
|
|
var addressPattern = AddressValidator.getAddressFromStringPattern(type);
|
2023-01-24 20:24:46 +02:00
|
|
|
|
|
|
|
if (addressPattern == null) {
|
2023-04-21 21:36:47 +03:00
|
|
|
throw Exception('Unexpected token: $type for getAddressFromStringPattern');
|
2023-01-24 20:24:46 +02:00
|
|
|
}
|
|
|
|
|
2025-06-18 16:20:03 +02:00
|
|
|
if (requireSurroundingWhitespaces)
|
|
|
|
addressPattern = "$BEFORE_REGEX$addressPattern$AFTER_REGEX";
|
|
|
|
|
2024-09-20 14:24:25 +00:00
|
|
|
final match = RegExp(addressPattern, multiLine: true).firstMatch(raw);
|
Bitcoin derivations (#1089)
* - Update and Fix Conflicts with main
* Add Balances for ERC20 tokens
* Fix conflicts with main
* Add erc20 abi json
* Add send erc20 tokens initial function
* add missing getHeightByDate in Haven [skip ci]
* Allow contacts and wallets from the same tag
* Add Shiba Inu icon
* Add send ERC-20 tokens initial flow
* Add missing import in generated file
* Add initial approach for transaction sending for ERC-20 tokens
* Refactor signing/sending transactions
* Add initial flow for transactions subscription
* Refactor signing/sending transactions
* Add home settings icon
* Fix conflicts with main
* Initial flow for home settings
* Add logic flow for adding erc20 tokens
* Fix initial UI
* Finalize UI for Tokens
* Integrate UI with Ethereum flow
* Add "Enable/Disable" feature for ERC20 tokens
* Add initial Erc20 tokens
* Add Sorting and Pin Native Token features
* Fix price sorting
* Sort tokens list as well when Sort criteria changes
* - Improve sorting balances flow
- Add initial add token from search bar flow
* Fix Accounts Popup UI
* Fix Pin native token
* Fix Enabling/Disabling tokens
Fix sorting by fiat once app is opened
Improve token availability mechanism
* Fix deleting token
Fix renaming tokens
* Fix issue with search
* Add more tokens
* - Fix scroll issue
- Add ERC20 tokens placeholder image in picker
* - Separate and organize default erc20 tokens
- Fix scrolling
- Add token placeholder images in picker
- Sort disabled tokens alphabetically
* Change BNB token initial availability [skip ci]
* Fix Conflicts with main
* Fix Conflicts with main
* Add Verse ERC20 token to the initial tokens list
* Add rename wallet to Ethereum
* Integrate EtherScan API for fetching address transactions
Generate Ethereum specific secrets in Ethereum package
* Adjust transactions fiat price for ERC20 tokens
* Free Up GitHub Actions Ubuntu Runner Disk Space
* Free Up GitHub Actions Ubuntu Runner Disk space (trial 2)
* Fix Transaction Fee display
* Save transaction history
* Enhance loading time for erc20 tokens transactions
* Minor Fixes and Enhancements
* Fix sending erc20
fix block explorer issue
* Fix int overflow
* Fix transaction amount conversions
* Minor: `slow` -> `Slow` [skip-ci]
* initial changes
* more base config stuff
* config changes
* successfully builds!
* save
* successfully add nano wallet
* save
* seed generation
* receive screen + node screen working
* tx history working and fiat fixes
* balance working
* derivation updates
* nano-unfinished
* sends working
* remove fees from send screen, send and receive transactions working
* fixes + auto receive incoming txs
* fix for scanning QR codes
* save
* update translations
* fixes
* more fixes
* more strings
* small fix
* fix github actions workflow
* potential fix
* potential fix
* ci/cd fix
* change rep working
* seed generation fixes
* fixes
* save
* change rep screen functional
* save
* banano changes
* fixes, start adding ui for PoW
* pow node changes
* update translations
* fix
* account changing barely working
* save
* disable account generation
* small fix
* save
* UI work
* save
* fixes after merge main
* fixes
* remove monero stuff, work on derivation ui
* lots of fixes + finish up seed derivation
* last minute fixes
* node related fixes
* more fixes
* small fix
* more fixes
* fixes
* pretty big refactor for pow, still some bugs
* finally works!
* get transactions after send
* fix
* merge conflict fixes
* save
* fix pow node showing up twice
* done
* initial changes
* small fix
* more merge fixes
* fixes
* more fixes
* fix
* save
* fix manage pow nodes setting appearing on other wallets
* fix contact bug
* fixes
* fiat fixes
* save
* save
* save
* save
* updates
* cleanup
* restore fix
* fixes
* remove deprecated alert
* fix
* small fix
* remove outdated warning
* electrum restore fixes
* fixes
* fixes
* fix
* derivation fixes
* nano fixes pt.1
* nano fixes pt.2
* bip39 fixes
* pownode refactor
* nodes pages fixes
* observer fix
* ssl fix
* remove old references
* remove unused imports
* code cleanup
* small fix
* small potential fix
* save
* derivation fixes
* deterministic fix
* fix pt.2
* derivation class fixes
* review fixes from nano that also apply here
* formatting
* stuff that should've stayed deleted
* post merge fixes
* remove problematic imports and duplicate changes
* Delete lib/nano/nano.dart
* move wallet restore page proxy code to the view model
* fix dashboard page indicators being the same color
* debatably better refactoring of derivationInfo, migration needed
* additional refactor improvements
* blanket comment some stuff out to narrow down this issue
* refactor fixes
* fix nano exchange
* fix , bug, i.e. replace , with . when making a nano transaction
* fix nano sending, update restore page wording, and other minor fixes
* write migration for existing bitcoin and nano wallets
* merge fixes
* minor fixes
* use default derivation type when restoring from qr code
* fixes for restoring
* fixes
* fixes
* merge fix
* Fix issues with Creating Electrum and Restoring Bip39
* updates & fixes
* Add missing case for no transactions BIP39 wallet restore
* Make the default BIP39 the 84 derivation path
* Add Samourai Deposit
* litecoin mnemonic error fix
* Bip39 passphrase support (#1412)
* save
* passphrase working
* fix for when loading wallets + translation update
* minor fix
* Fix Nano
* minor fix [skip ci]
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
* change error state seed conditions into throwables [skip ci]
* litecoin fixes
* Bip39 minor enhancements (#1416)
* minor enhancements
* rename bitcoin_derivations -> electrum_derivations
* Remove duplicate derivations
handle default case
* minor fix
* Enable passphrase for Litecoin
* obscure text of passphrase
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Justin Ehrenhofer <justin.ehrenhofer@gmail.com>
Co-authored-by: fossephate <fosse@book.local>
2024-04-29 17:49:56 -07:00
|
|
|
return match?.group(0)?.replaceAllMapped(RegExp('[^0-9a-zA-Z]|bitcoincash:|nano_|ban_'),
|
2024-03-04 19:32:10 +02:00
|
|
|
(Match match) {
|
2023-10-17 11:59:41 -04:00
|
|
|
String group = match.group(0)!;
|
Bitcoin derivations (#1089)
* - Update and Fix Conflicts with main
* Add Balances for ERC20 tokens
* Fix conflicts with main
* Add erc20 abi json
* Add send erc20 tokens initial function
* add missing getHeightByDate in Haven [skip ci]
* Allow contacts and wallets from the same tag
* Add Shiba Inu icon
* Add send ERC-20 tokens initial flow
* Add missing import in generated file
* Add initial approach for transaction sending for ERC-20 tokens
* Refactor signing/sending transactions
* Add initial flow for transactions subscription
* Refactor signing/sending transactions
* Add home settings icon
* Fix conflicts with main
* Initial flow for home settings
* Add logic flow for adding erc20 tokens
* Fix initial UI
* Finalize UI for Tokens
* Integrate UI with Ethereum flow
* Add "Enable/Disable" feature for ERC20 tokens
* Add initial Erc20 tokens
* Add Sorting and Pin Native Token features
* Fix price sorting
* Sort tokens list as well when Sort criteria changes
* - Improve sorting balances flow
- Add initial add token from search bar flow
* Fix Accounts Popup UI
* Fix Pin native token
* Fix Enabling/Disabling tokens
Fix sorting by fiat once app is opened
Improve token availability mechanism
* Fix deleting token
Fix renaming tokens
* Fix issue with search
* Add more tokens
* - Fix scroll issue
- Add ERC20 tokens placeholder image in picker
* - Separate and organize default erc20 tokens
- Fix scrolling
- Add token placeholder images in picker
- Sort disabled tokens alphabetically
* Change BNB token initial availability [skip ci]
* Fix Conflicts with main
* Fix Conflicts with main
* Add Verse ERC20 token to the initial tokens list
* Add rename wallet to Ethereum
* Integrate EtherScan API for fetching address transactions
Generate Ethereum specific secrets in Ethereum package
* Adjust transactions fiat price for ERC20 tokens
* Free Up GitHub Actions Ubuntu Runner Disk Space
* Free Up GitHub Actions Ubuntu Runner Disk space (trial 2)
* Fix Transaction Fee display
* Save transaction history
* Enhance loading time for erc20 tokens transactions
* Minor Fixes and Enhancements
* Fix sending erc20
fix block explorer issue
* Fix int overflow
* Fix transaction amount conversions
* Minor: `slow` -> `Slow` [skip-ci]
* initial changes
* more base config stuff
* config changes
* successfully builds!
* save
* successfully add nano wallet
* save
* seed generation
* receive screen + node screen working
* tx history working and fiat fixes
* balance working
* derivation updates
* nano-unfinished
* sends working
* remove fees from send screen, send and receive transactions working
* fixes + auto receive incoming txs
* fix for scanning QR codes
* save
* update translations
* fixes
* more fixes
* more strings
* small fix
* fix github actions workflow
* potential fix
* potential fix
* ci/cd fix
* change rep working
* seed generation fixes
* fixes
* save
* change rep screen functional
* save
* banano changes
* fixes, start adding ui for PoW
* pow node changes
* update translations
* fix
* account changing barely working
* save
* disable account generation
* small fix
* save
* UI work
* save
* fixes after merge main
* fixes
* remove monero stuff, work on derivation ui
* lots of fixes + finish up seed derivation
* last minute fixes
* node related fixes
* more fixes
* small fix
* more fixes
* fixes
* pretty big refactor for pow, still some bugs
* finally works!
* get transactions after send
* fix
* merge conflict fixes
* save
* fix pow node showing up twice
* done
* initial changes
* small fix
* more merge fixes
* fixes
* more fixes
* fix
* save
* fix manage pow nodes setting appearing on other wallets
* fix contact bug
* fixes
* fiat fixes
* save
* save
* save
* save
* updates
* cleanup
* restore fix
* fixes
* remove deprecated alert
* fix
* small fix
* remove outdated warning
* electrum restore fixes
* fixes
* fixes
* fix
* derivation fixes
* nano fixes pt.1
* nano fixes pt.2
* bip39 fixes
* pownode refactor
* nodes pages fixes
* observer fix
* ssl fix
* remove old references
* remove unused imports
* code cleanup
* small fix
* small potential fix
* save
* derivation fixes
* deterministic fix
* fix pt.2
* derivation class fixes
* review fixes from nano that also apply here
* formatting
* stuff that should've stayed deleted
* post merge fixes
* remove problematic imports and duplicate changes
* Delete lib/nano/nano.dart
* move wallet restore page proxy code to the view model
* fix dashboard page indicators being the same color
* debatably better refactoring of derivationInfo, migration needed
* additional refactor improvements
* blanket comment some stuff out to narrow down this issue
* refactor fixes
* fix nano exchange
* fix , bug, i.e. replace , with . when making a nano transaction
* fix nano sending, update restore page wording, and other minor fixes
* write migration for existing bitcoin and nano wallets
* merge fixes
* minor fixes
* use default derivation type when restoring from qr code
* fixes for restoring
* fixes
* fixes
* merge fix
* Fix issues with Creating Electrum and Restoring Bip39
* updates & fixes
* Add missing case for no transactions BIP39 wallet restore
* Make the default BIP39 the 84 derivation path
* Add Samourai Deposit
* litecoin mnemonic error fix
* Bip39 passphrase support (#1412)
* save
* passphrase working
* fix for when loading wallets + translation update
* minor fix
* Fix Nano
* minor fix [skip ci]
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
* change error state seed conditions into throwables [skip ci]
* litecoin fixes
* Bip39 minor enhancements (#1416)
* minor enhancements
* rename bitcoin_derivations -> electrum_derivations
* Remove duplicate derivations
handle default case
* minor fix
* Enable passphrase for Litecoin
* obscure text of passphrase
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Justin Ehrenhofer <justin.ehrenhofer@gmail.com>
Co-authored-by: fossephate <fosse@book.local>
2024-04-29 17:49:56 -07:00
|
|
|
if (group.startsWith('bitcoincash:') ||
|
|
|
|
group.startsWith('nano_') ||
|
|
|
|
group.startsWith('ban_')) {
|
2023-10-17 11:59:41 -04:00
|
|
|
return group;
|
|
|
|
}
|
|
|
|
return '';
|
|
|
|
});
|
2023-01-24 20:24:46 +02:00
|
|
|
}
|
|
|
|
|
2024-01-27 04:34:38 +02:00
|
|
|
bool isEmailFormat(String address) {
|
|
|
|
final RegExp emailRegex = RegExp(
|
|
|
|
r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$',
|
|
|
|
caseSensitive: false,
|
|
|
|
);
|
|
|
|
return emailRegex.hasMatch(address);
|
|
|
|
}
|
|
|
|
|
2024-05-06 22:16:25 +03:00
|
|
|
Future<ParsedAddress> resolve(BuildContext context, String text, CryptoCurrency currency) async {
|
|
|
|
final ticker = currency.title;
|
2022-03-15 10:11:53 +01:00
|
|
|
try {
|
2024-12-18 19:55:48 +02:00
|
|
|
// twitter handle example: @username
|
2023-01-24 20:24:46 +02:00
|
|
|
if (text.startsWith('@') && !text.substring(1).contains('@')) {
|
Zano with passphrase (#1971)
* CW-685 Add passphrase restore for xmr/wow (#1552)
* CW-685 Add passphrase restore for xmr/wow
* add support for polyseed passphrase
* disable 14 word seed passphrase (not supported in wownero-seed)
fix: Getting grayed screen on latest passphrase build after having restored a 14-word wownero seed (+passphrase) and attempting to restore a XMR seed, legacy or otherwise.
* fix pointer when restoring depracated wownero seed
* Fix polyseed encryption
* changes from review
* remove unused code
* add passphrase back to the screen
add passphrase to qr code backup export
* fix settings leaking through currencies on seed restore
* fix monero.com builds, make passphrase a getter on WalletBase
* add support for weird polyseed
* store passphrase for weird polyseed
* show encrypted seed only when passphrase is not empty
* force set restore height
* fix build issues
* fix build errors
* fix configure script
* print -> printV
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update tool/configure.dart [skip ci]
* Update lib/view_model/wallet_new_vm.dart
* reuse existing passphrase field
* remove unused passphrase field
* make workflow run on pullrequests only [skip ci] [skip slack]
---------
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* Zano (#1793)
* my experiments
* Inital code for Zano integration
* Added missing android log lib
* added dummy wallet & some zano implementation
* fixing api for zano
* fixed zano build script
* attempt tp fix namespace problem
* added copy script for Zano files
* changes for zano wallet
* last updates
* zano.dart test app
* wallet recovery
* added pending transfer, some cleanup of unused
* some cleanup
* send + receive qr code
* last upd
* updated build_zano.sh
* updated zano ApiCalls, removed dummy
* updated zano ApiCalls, removed dummy
* added logging for get status/get info
* restored old wallet.dart
* restoring original versions of files
* restoring original versions of files
* restored get_height_by_date.dart, removed unnecessary calls for zano get height
* restoring original versions
* added multiple destinations, send all flag; some refactoring
* logging
* removed the duplicate
* fixed syncing sync status, decimal division, safe null json parsing
* some fixes after merge
* added multibalance/asset support for zano (ui)
* adding/removing from whitelist
* transfers in different assets
* transfers for multiple destinations and send all, some refactoring
* whitelists, some refactoring
* added different digits (decimal points) for formatters, some refactoring
* open, create, restore wallet refactoring; whitelists
* whitelists
* getting and updating transaction list; restoring a wallet from QR code
* several attempts to close wallet
* some refactoring
* added seed phrase
* changed fields to BigInt, some fixes
* modified build scripts for android
* build scripts
* restored accidently removed cw_haven.dart
* inital ios integration(zano libs built)
* update in script
* latest changes
* Applied a patch for iOS build (Boost and Zano scripts)
* Removed zano.dart (script-generated) and some unnecessary files
* Revert "Removed zano.dart (script-generated) and some unnecessary files"
This reverts commit 367c86398ef2616006a2cbd2339ef2f30ed2800e.
* Removed zano.dart (generated by scripts), some files restored to initial versions
* added timer library
* changed paths in build_zano.sh
* build_zano.sh
* edit_token_page.dart - removed flag skipZanoAddressValidation
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* lib/core/address_validator.dart - updated zano address regex
lib/src/screens/dashboard/edit_token_page.dart - using AddressValidator().call
* fix zano build issues on android
* remove contrib/depends to save space
* move async call to a synchronouse one
* call sync call in isolate to make it async
generate framework for iOS as well
fix UR issues
* zano changes from monero_c repo
* update monero_c hash
* fix invalid zano imports, add support for linux, speed up CI builds
* update monero_c hash
* bump monero_c commit (yes, again, I know)
* fix wallet resttore, fix hardcoded IP
* fix regex, don't throw error when opening wallet, fix tx history, fix async calls, move stuff to isolate
* fix api calls in async transaction creation
* update build scripts
* fix some build issues
* update dependencies
* fix dependencies
* update ci scripts
* Improve multithread use of zano api
* Fix build issue
* fix zano node selection, move other zano calls to separate isolate
* update moneroc hash
WIP fixes for zano
* update monero_c
* fix monero.com builds
* sync wallet after connecting
* update monero_c
* Fix windows builds
* update monero_c
* update monero_c
* unshallow submodule
* cherry pick CW-867 Wownero fixes (#1881)
* fix wownero syntax error
* remove print statements in zano
* update zano node URL
* [PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)
* drop env -i to fix cmake build errors on newer system
* [skip ci] Revert "[PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)"
This reverts commit 5acb5bfe57c4b2aeb7aa40bd684a3319a68f98bc.
* [run tests] [skip slack] Fix env in build
* Dynamically detect number of cores used to build monero_c, since it appears that zano requires more memory to link (and it reliably fails for first couple builds due to OOM on CI/VM with memory constrains).
Drop unshallowing of all modules
[run tests]
* Changes from review [run tests]
* drop zano on linux (missing symbols)
fix wownero on linux
add aarch64-linux-gnu
[run tests]
* - remove duplicate entry in addToken()
- use walletPassword in createZanoNewWalletCredentials
- remove createZanoRestoreWalletFromKeysCredentials
[run tests]
* [skip ci] update dockerfile
* fix parameter issue
---------
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* - Add Zano Aliases
- Enable simpleswap [skip ci]
- Fix settings migration versions
* push missing file [skip ci]
* Zano pr with CW-685 passphrase (#1969)
* my experiments
* Inital code for Zano integration
* Added missing android log lib
* added dummy wallet & some zano implementation
* fixing api for zano
* fixed zano build script
* attempt tp fix namespace problem
* added copy script for Zano files
* changes for zano wallet
* last updates
* zano.dart test app
* wallet recovery
* added pending transfer, some cleanup of unused
* some cleanup
* send + receive qr code
* last upd
* updated build_zano.sh
* updated zano ApiCalls, removed dummy
* updated zano ApiCalls, removed dummy
* added logging for get status/get info
* restored old wallet.dart
* restoring original versions of files
* restoring original versions of files
* restored get_height_by_date.dart, removed unnecessary calls for zano get height
* restoring original versions
* added multiple destinations, send all flag; some refactoring
* logging
* removed the duplicate
* fixed syncing sync status, decimal division, safe null json parsing
* some fixes after merge
* added multibalance/asset support for zano (ui)
* adding/removing from whitelist
* transfers in different assets
* transfers for multiple destinations and send all, some refactoring
* whitelists, some refactoring
* added different digits (decimal points) for formatters, some refactoring
* open, create, restore wallet refactoring; whitelists
* whitelists
* getting and updating transaction list; restoring a wallet from QR code
* several attempts to close wallet
* some refactoring
* added seed phrase
* CW-685 Add passphrase restore for xmr/wow
* add support for polyseed passphrase
* disable 14 word seed passphrase (not supported in wownero-seed)
fix: Getting grayed screen on latest passphrase build after having restored a 14-word wownero seed (+passphrase) and attempting to restore a XMR seed, legacy or otherwise.
* fix pointer when restoring depracated wownero seed
* Fix polyseed encryption
* changed fields to BigInt, some fixes
* modified build scripts for android
* build scripts
* restored accidently removed cw_haven.dart
* inital ios integration(zano libs built)
* update in script
* latest changes
* changes from review
* remove unused code
* add passphrase back to the screen
add passphrase to qr code backup export
* fix settings leaking through currencies on seed restore
* fix monero.com builds, make passphrase a getter on WalletBase
* add support for weird polyseed
* store passphrase for weird polyseed
* show encrypted seed only when passphrase is not empty
* force set restore height
* Applied a patch for iOS build (Boost and Zano scripts)
* Removed zano.dart (script-generated) and some unnecessary files
* Revert "Removed zano.dart (script-generated) and some unnecessary files"
This reverts commit 367c86398ef2616006a2cbd2339ef2f30ed2800e.
* Removed zano.dart (generated by scripts), some files restored to initial versions
* fix build issues
* fix build errors
* added timer library
* changed paths in build_zano.sh
* build_zano.sh
* edit_token_page.dart - removed flag skipZanoAddressValidation
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* lib/core/address_validator.dart - updated zano address regex
lib/src/screens/dashboard/edit_token_page.dart - using AddressValidator().call
* fix zano build issues on android
* remove contrib/depends to save space
* move async call to a synchronouse one
* call sync call in isolate to make it async
generate framework for iOS as well
fix UR issues
* zano changes from monero_c repo
* update monero_c hash
* fix invalid zano imports, add support for linux, speed up CI builds
* update monero_c hash
* bump monero_c commit (yes, again, I know)
* fix wallet resttore, fix hardcoded IP
* fix regex, don't throw error when opening wallet, fix tx history, fix async calls, move stuff to isolate
* fix api calls in async transaction creation
* fix configure script
* update build scripts
* fix some build issues
* update dependencies
* fix dependencies
* update ci scripts
* Improve multithread use of zano api
* Fix build issue
* fix zano node selection, move other zano calls to separate isolate
* update moneroc hash
WIP fixes for zano
* update monero_c
* fix monero.com builds
* sync wallet after connecting
* update monero_c
* Fix windows builds
* update monero_c
* print -> printV
* update monero_c
* unshallow submodule
* cherry pick CW-867 Wownero fixes (#1881)
* fix wownero syntax error
* remove print statements in zano
* update zano node URL
* [PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)
* drop env -i to fix cmake build errors on newer system
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update tool/configure.dart [skip ci]
* Update lib/view_model/wallet_new_vm.dart
* [skip ci] Revert "[PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)"
This reverts commit 5acb5bfe57c4b2aeb7aa40bd684a3319a68f98bc.
* [run tests] [skip slack] Fix env in build
* Dynamically detect number of cores used to build monero_c, since it appears that zano requires more memory to link (and it reliably fails for first couple builds due to OOM on CI/VM with memory constrains).
Drop unshallowing of all modules
[run tests]
* Changes from review [run tests]
* drop zano on linux (missing symbols)
fix wownero on linux
add aarch64-linux-gnu
[run tests]
* - remove duplicate entry in addToken()
- use walletPassword in createZanoNewWalletCredentials
- remove createZanoRestoreWalletFromKeysCredentials
[run tests]
* [skip ci] update dockerfile
* reuse existing passphrase field
* add passphrase support for zano
* Drop aarch64-linux-gnu for now.
* fix passphrase display, fix gray screen
* catch errors in polyseed encryption, encrypt only polyseed, fix coin in wownero
* update monero_c
update wownero to 0.11.3.0
* Show passphrase only when non-empty, fix passphrase being displayed as view key private.
* fix NanoAccountListPage showing up instead of MoneroAccountListPage for wownero
* build zano dependencies on android
* fix parameter issue
* minor merge leftover [skip ci]
* minor cleanup [skip ci]
* fix zano alias
update eth url for ens lookup
change $MAKE_JOB_COUNT to $NPROC
* minor cleanup [skip ci]
* fix zano alias
* Disable passphrase for creation of xmr/wow/zano
minor fixes
* fix zano on iOS
* - Fix get token data
- Enable unavailable balance
- Enable confirmations count
- Adjust explorer link
---------
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
---------
Co-authored-by: cyan <cyjan@mrcyjanek.net>
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
2025-01-24 20:33:24 +02:00
|
|
|
if (currency == CryptoCurrency.zano && settingsStore.lookupsZanoAlias) {
|
|
|
|
final formattedName = text.substring(1);
|
|
|
|
final zanoAddress = await ZanoAlias.fetchZanoAliasAddress(formattedName);
|
2025-01-28 23:53:43 +02:00
|
|
|
if (zanoAddress != null && zanoAddress.isNotEmpty) {
|
Zano with passphrase (#1971)
* CW-685 Add passphrase restore for xmr/wow (#1552)
* CW-685 Add passphrase restore for xmr/wow
* add support for polyseed passphrase
* disable 14 word seed passphrase (not supported in wownero-seed)
fix: Getting grayed screen on latest passphrase build after having restored a 14-word wownero seed (+passphrase) and attempting to restore a XMR seed, legacy or otherwise.
* fix pointer when restoring depracated wownero seed
* Fix polyseed encryption
* changes from review
* remove unused code
* add passphrase back to the screen
add passphrase to qr code backup export
* fix settings leaking through currencies on seed restore
* fix monero.com builds, make passphrase a getter on WalletBase
* add support for weird polyseed
* store passphrase for weird polyseed
* show encrypted seed only when passphrase is not empty
* force set restore height
* fix build issues
* fix build errors
* fix configure script
* print -> printV
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update tool/configure.dart [skip ci]
* Update lib/view_model/wallet_new_vm.dart
* reuse existing passphrase field
* remove unused passphrase field
* make workflow run on pullrequests only [skip ci] [skip slack]
---------
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* Zano (#1793)
* my experiments
* Inital code for Zano integration
* Added missing android log lib
* added dummy wallet & some zano implementation
* fixing api for zano
* fixed zano build script
* attempt tp fix namespace problem
* added copy script for Zano files
* changes for zano wallet
* last updates
* zano.dart test app
* wallet recovery
* added pending transfer, some cleanup of unused
* some cleanup
* send + receive qr code
* last upd
* updated build_zano.sh
* updated zano ApiCalls, removed dummy
* updated zano ApiCalls, removed dummy
* added logging for get status/get info
* restored old wallet.dart
* restoring original versions of files
* restoring original versions of files
* restored get_height_by_date.dart, removed unnecessary calls for zano get height
* restoring original versions
* added multiple destinations, send all flag; some refactoring
* logging
* removed the duplicate
* fixed syncing sync status, decimal division, safe null json parsing
* some fixes after merge
* added multibalance/asset support for zano (ui)
* adding/removing from whitelist
* transfers in different assets
* transfers for multiple destinations and send all, some refactoring
* whitelists, some refactoring
* added different digits (decimal points) for formatters, some refactoring
* open, create, restore wallet refactoring; whitelists
* whitelists
* getting and updating transaction list; restoring a wallet from QR code
* several attempts to close wallet
* some refactoring
* added seed phrase
* changed fields to BigInt, some fixes
* modified build scripts for android
* build scripts
* restored accidently removed cw_haven.dart
* inital ios integration(zano libs built)
* update in script
* latest changes
* Applied a patch for iOS build (Boost and Zano scripts)
* Removed zano.dart (script-generated) and some unnecessary files
* Revert "Removed zano.dart (script-generated) and some unnecessary files"
This reverts commit 367c86398ef2616006a2cbd2339ef2f30ed2800e.
* Removed zano.dart (generated by scripts), some files restored to initial versions
* added timer library
* changed paths in build_zano.sh
* build_zano.sh
* edit_token_page.dart - removed flag skipZanoAddressValidation
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* lib/core/address_validator.dart - updated zano address regex
lib/src/screens/dashboard/edit_token_page.dart - using AddressValidator().call
* fix zano build issues on android
* remove contrib/depends to save space
* move async call to a synchronouse one
* call sync call in isolate to make it async
generate framework for iOS as well
fix UR issues
* zano changes from monero_c repo
* update monero_c hash
* fix invalid zano imports, add support for linux, speed up CI builds
* update monero_c hash
* bump monero_c commit (yes, again, I know)
* fix wallet resttore, fix hardcoded IP
* fix regex, don't throw error when opening wallet, fix tx history, fix async calls, move stuff to isolate
* fix api calls in async transaction creation
* update build scripts
* fix some build issues
* update dependencies
* fix dependencies
* update ci scripts
* Improve multithread use of zano api
* Fix build issue
* fix zano node selection, move other zano calls to separate isolate
* update moneroc hash
WIP fixes for zano
* update monero_c
* fix monero.com builds
* sync wallet after connecting
* update monero_c
* Fix windows builds
* update monero_c
* update monero_c
* unshallow submodule
* cherry pick CW-867 Wownero fixes (#1881)
* fix wownero syntax error
* remove print statements in zano
* update zano node URL
* [PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)
* drop env -i to fix cmake build errors on newer system
* [skip ci] Revert "[PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)"
This reverts commit 5acb5bfe57c4b2aeb7aa40bd684a3319a68f98bc.
* [run tests] [skip slack] Fix env in build
* Dynamically detect number of cores used to build monero_c, since it appears that zano requires more memory to link (and it reliably fails for first couple builds due to OOM on CI/VM with memory constrains).
Drop unshallowing of all modules
[run tests]
* Changes from review [run tests]
* drop zano on linux (missing symbols)
fix wownero on linux
add aarch64-linux-gnu
[run tests]
* - remove duplicate entry in addToken()
- use walletPassword in createZanoNewWalletCredentials
- remove createZanoRestoreWalletFromKeysCredentials
[run tests]
* [skip ci] update dockerfile
* fix parameter issue
---------
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* - Add Zano Aliases
- Enable simpleswap [skip ci]
- Fix settings migration versions
* push missing file [skip ci]
* Zano pr with CW-685 passphrase (#1969)
* my experiments
* Inital code for Zano integration
* Added missing android log lib
* added dummy wallet & some zano implementation
* fixing api for zano
* fixed zano build script
* attempt tp fix namespace problem
* added copy script for Zano files
* changes for zano wallet
* last updates
* zano.dart test app
* wallet recovery
* added pending transfer, some cleanup of unused
* some cleanup
* send + receive qr code
* last upd
* updated build_zano.sh
* updated zano ApiCalls, removed dummy
* updated zano ApiCalls, removed dummy
* added logging for get status/get info
* restored old wallet.dart
* restoring original versions of files
* restoring original versions of files
* restored get_height_by_date.dart, removed unnecessary calls for zano get height
* restoring original versions
* added multiple destinations, send all flag; some refactoring
* logging
* removed the duplicate
* fixed syncing sync status, decimal division, safe null json parsing
* some fixes after merge
* added multibalance/asset support for zano (ui)
* adding/removing from whitelist
* transfers in different assets
* transfers for multiple destinations and send all, some refactoring
* whitelists, some refactoring
* added different digits (decimal points) for formatters, some refactoring
* open, create, restore wallet refactoring; whitelists
* whitelists
* getting and updating transaction list; restoring a wallet from QR code
* several attempts to close wallet
* some refactoring
* added seed phrase
* CW-685 Add passphrase restore for xmr/wow
* add support for polyseed passphrase
* disable 14 word seed passphrase (not supported in wownero-seed)
fix: Getting grayed screen on latest passphrase build after having restored a 14-word wownero seed (+passphrase) and attempting to restore a XMR seed, legacy or otherwise.
* fix pointer when restoring depracated wownero seed
* Fix polyseed encryption
* changed fields to BigInt, some fixes
* modified build scripts for android
* build scripts
* restored accidently removed cw_haven.dart
* inital ios integration(zano libs built)
* update in script
* latest changes
* changes from review
* remove unused code
* add passphrase back to the screen
add passphrase to qr code backup export
* fix settings leaking through currencies on seed restore
* fix monero.com builds, make passphrase a getter on WalletBase
* add support for weird polyseed
* store passphrase for weird polyseed
* show encrypted seed only when passphrase is not empty
* force set restore height
* Applied a patch for iOS build (Boost and Zano scripts)
* Removed zano.dart (script-generated) and some unnecessary files
* Revert "Removed zano.dart (script-generated) and some unnecessary files"
This reverts commit 367c86398ef2616006a2cbd2339ef2f30ed2800e.
* Removed zano.dart (generated by scripts), some files restored to initial versions
* fix build issues
* fix build errors
* added timer library
* changed paths in build_zano.sh
* build_zano.sh
* edit_token_page.dart - removed flag skipZanoAddressValidation
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* lib/core/address_validator.dart - updated zano address regex
lib/src/screens/dashboard/edit_token_page.dart - using AddressValidator().call
* fix zano build issues on android
* remove contrib/depends to save space
* move async call to a synchronouse one
* call sync call in isolate to make it async
generate framework for iOS as well
fix UR issues
* zano changes from monero_c repo
* update monero_c hash
* fix invalid zano imports, add support for linux, speed up CI builds
* update monero_c hash
* bump monero_c commit (yes, again, I know)
* fix wallet resttore, fix hardcoded IP
* fix regex, don't throw error when opening wallet, fix tx history, fix async calls, move stuff to isolate
* fix api calls in async transaction creation
* fix configure script
* update build scripts
* fix some build issues
* update dependencies
* fix dependencies
* update ci scripts
* Improve multithread use of zano api
* Fix build issue
* fix zano node selection, move other zano calls to separate isolate
* update moneroc hash
WIP fixes for zano
* update monero_c
* fix monero.com builds
* sync wallet after connecting
* update monero_c
* Fix windows builds
* update monero_c
* print -> printV
* update monero_c
* unshallow submodule
* cherry pick CW-867 Wownero fixes (#1881)
* fix wownero syntax error
* remove print statements in zano
* update zano node URL
* [PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)
* drop env -i to fix cmake build errors on newer system
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update lib/view_model/wallet_keys_view_model.dart [skip ci]
* Update tool/configure.dart [skip ci]
* Update lib/view_model/wallet_new_vm.dart
* [skip ci] Revert "[PATCH] Apply new CI script (https://github.com/cake-tech/cake_wallet/pull/1948)"
This reverts commit 5acb5bfe57c4b2aeb7aa40bd684a3319a68f98bc.
* [run tests] [skip slack] Fix env in build
* Dynamically detect number of cores used to build monero_c, since it appears that zano requires more memory to link (and it reliably fails for first couple builds due to OOM on CI/VM with memory constrains).
Drop unshallowing of all modules
[run tests]
* Changes from review [run tests]
* drop zano on linux (missing symbols)
fix wownero on linux
add aarch64-linux-gnu
[run tests]
* - remove duplicate entry in addToken()
- use walletPassword in createZanoNewWalletCredentials
- remove createZanoRestoreWalletFromKeysCredentials
[run tests]
* [skip ci] update dockerfile
* reuse existing passphrase field
* add passphrase support for zano
* Drop aarch64-linux-gnu for now.
* fix passphrase display, fix gray screen
* catch errors in polyseed encryption, encrypt only polyseed, fix coin in wownero
* update monero_c
update wownero to 0.11.3.0
* Show passphrase only when non-empty, fix passphrase being displayed as view key private.
* fix NanoAccountListPage showing up instead of MoneroAccountListPage for wownero
* build zano dependencies on android
* fix parameter issue
* minor merge leftover [skip ci]
* minor cleanup [skip ci]
* fix zano alias
update eth url for ens lookup
change $MAKE_JOB_COUNT to $NPROC
* minor cleanup [skip ci]
* fix zano alias
* Disable passphrase for creation of xmr/wow/zano
minor fixes
* fix zano on iOS
* - Fix get token data
- Enable unavailable balance
- Enable confirmations count
- Adjust explorer link
---------
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
---------
Co-authored-by: cyan <cyjan@mrcyjanek.net>
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: leo <leonid.ivanov@gmail.com>
Co-authored-by: cr.zoidberg <crypto.zoidberg@gmail.com>
2025-01-24 20:33:24 +02:00
|
|
|
return ParsedAddress.zanoAddress(
|
|
|
|
address: zanoAddress,
|
|
|
|
name: text,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2024-03-01 21:38:48 +02:00
|
|
|
if (settingsStore.lookupsTwitter) {
|
2023-11-03 21:23:11 +02:00
|
|
|
final formattedName = text.substring(1);
|
|
|
|
final twitterUser = await TwitterApi.lookupUserByName(userName: formattedName);
|
|
|
|
final addressFromBio = extractAddressByType(
|
2024-03-04 19:32:10 +02:00
|
|
|
raw: twitterUser.description,
|
|
|
|
type: CryptoCurrency.fromString(ticker, walletCurrency: wallet.currency));
|
2025-01-28 23:53:43 +02:00
|
|
|
if (addressFromBio != null && addressFromBio.isNotEmpty) {
|
2024-03-01 21:38:48 +02:00
|
|
|
return ParsedAddress.fetchTwitterAddress(
|
|
|
|
address: addressFromBio,
|
|
|
|
name: text,
|
|
|
|
profileImageUrl: twitterUser.profileImageUrl,
|
|
|
|
profileName: twitterUser.name);
|
2023-11-03 21:23:11 +02:00
|
|
|
}
|
2023-02-13 00:38:12 +02:00
|
|
|
|
2023-11-03 21:23:11 +02:00
|
|
|
final pinnedTweet = twitterUser.pinnedTweet?.text;
|
|
|
|
if (pinnedTweet != null) {
|
2024-03-04 19:32:10 +02:00
|
|
|
final addressFromPinnedTweet = extractAddressByType(
|
|
|
|
raw: pinnedTweet,
|
|
|
|
type: CryptoCurrency.fromString(ticker, walletCurrency: wallet.currency));
|
2023-11-03 21:23:11 +02:00
|
|
|
if (addressFromPinnedTweet != null) {
|
2024-03-01 21:38:48 +02:00
|
|
|
return ParsedAddress.fetchTwitterAddress(
|
|
|
|
address: addressFromPinnedTweet,
|
|
|
|
name: text,
|
|
|
|
profileImageUrl: twitterUser.profileImageUrl,
|
|
|
|
profileName: twitterUser.name);
|
2023-11-03 21:23:11 +02:00
|
|
|
}
|
2023-02-13 00:38:12 +02:00
|
|
|
}
|
2023-01-24 20:24:46 +02:00
|
|
|
}
|
|
|
|
}
|
2023-10-05 15:18:35 +03:00
|
|
|
|
2024-12-18 19:55:48 +02:00
|
|
|
// Mastodon example: @username@hostname.xxx
|
2023-10-05 15:18:35 +03:00
|
|
|
if (text.startsWith('@') && text.contains('@', 1) && text.contains('.', 1)) {
|
2023-11-03 21:23:11 +02:00
|
|
|
if (settingsStore.lookupsMastodon) {
|
|
|
|
final subText = text.substring(1);
|
|
|
|
final hostNameIndex = subText.indexOf('@');
|
|
|
|
final hostName = subText.substring(hostNameIndex + 1);
|
|
|
|
final userName = subText.substring(0, hostNameIndex);
|
|
|
|
|
|
|
|
final mastodonUser =
|
2024-03-04 19:32:10 +02:00
|
|
|
await MastodonAPI.lookupUserByUserName(userName: userName, apiHost: hostName);
|
2023-11-03 21:23:11 +02:00
|
|
|
|
|
|
|
if (mastodonUser != null) {
|
2024-05-06 22:16:25 +03:00
|
|
|
String? addressFromBio = extractAddressByType(raw: mastodonUser.note, type: currency);
|
2023-11-03 21:23:11 +02:00
|
|
|
|
2025-01-28 23:53:43 +02:00
|
|
|
if (addressFromBio != null && addressFromBio.isNotEmpty) {
|
2024-03-01 21:38:48 +02:00
|
|
|
return ParsedAddress.fetchMastodonAddress(
|
|
|
|
address: addressFromBio,
|
|
|
|
name: text,
|
|
|
|
profileImageUrl: mastodonUser.profileImageUrl,
|
|
|
|
profileName: mastodonUser.username);
|
2023-11-03 21:23:11 +02:00
|
|
|
} else {
|
|
|
|
final pinnedPosts =
|
2024-03-04 19:32:10 +02:00
|
|
|
await MastodonAPI.getPinnedPosts(userId: mastodonUser.id, apiHost: hostName);
|
2023-11-03 21:23:11 +02:00
|
|
|
|
|
|
|
if (pinnedPosts.isNotEmpty) {
|
|
|
|
final userPinnedPostsText = pinnedPosts.map((item) => item.content).join('\n');
|
2024-05-06 22:16:25 +03:00
|
|
|
String? addressFromPinnedPost =
|
|
|
|
extractAddressByType(raw: userPinnedPostsText, type: currency);
|
2023-11-03 21:23:11 +02:00
|
|
|
|
2025-01-28 23:53:43 +02:00
|
|
|
if (addressFromPinnedPost != null && addressFromPinnedPost.isNotEmpty) {
|
2023-11-03 21:23:11 +02:00
|
|
|
return ParsedAddress.fetchMastodonAddress(
|
2024-03-01 21:38:48 +02:00
|
|
|
address: addressFromPinnedPost,
|
|
|
|
name: text,
|
|
|
|
profileImageUrl: mastodonUser.profileImageUrl,
|
|
|
|
profileName: mastodonUser.username);
|
2023-11-03 21:23:11 +02:00
|
|
|
}
|
2023-10-05 15:18:35 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-01-15 17:03:30 -05:00
|
|
|
// .well-known scheme:
|
|
|
|
if (text.contains('.') && text.contains('@')) {
|
|
|
|
if (settingsStore.lookupsWellKnown) {
|
|
|
|
final record =
|
|
|
|
await WellKnownRecord.fetchAddressAndName(formattedName: text, currency: currency);
|
|
|
|
if (record != null) {
|
|
|
|
return ParsedAddress.fetchWellKnownAddress(address: record.address, name: text);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-24 20:24:46 +02:00
|
|
|
if (!text.startsWith('@') && text.contains('@') && !text.contains('.')) {
|
2022-06-13 14:41:46 +03:00
|
|
|
final bool isFioRegistered = await FioAddressProvider.checkAvail(text);
|
|
|
|
if (isFioRegistered) {
|
|
|
|
final address = await FioAddressProvider.getPubAddress(text, ticker);
|
2023-01-31 21:39:08 +02:00
|
|
|
return ParsedAddress.fetchFioAddress(address: address, name: text);
|
|
|
|
}
|
2022-06-13 14:41:46 +03:00
|
|
|
}
|
2022-03-15 10:11:53 +01:00
|
|
|
if (text.hasOnlyEmojis) {
|
2024-03-04 19:32:10 +02:00
|
|
|
if (settingsStore.lookupsYatService) {
|
2023-11-03 21:23:11 +02:00
|
|
|
if (walletType != WalletType.haven) {
|
|
|
|
final addresses = await yatService.fetchYatAddress(text, ticker);
|
|
|
|
return ParsedAddress.fetchEmojiAddress(addresses: addresses, name: text);
|
|
|
|
}
|
2022-06-28 18:46:32 +03:00
|
|
|
}
|
2021-08-27 20:46:24 +03:00
|
|
|
}
|
2024-05-06 22:16:25 +03:00
|
|
|
|
|
|
|
final thorChainAddress = await ThorChainExchangeProvider.lookupAddressByName(text);
|
2025-01-28 23:53:43 +02:00
|
|
|
if (thorChainAddress != null && thorChainAddress.isNotEmpty) {
|
2024-05-06 22:16:25 +03:00
|
|
|
String? address =
|
|
|
|
thorChainAddress[ticker] ?? (ticker == 'RUNE' ? thorChainAddress['THOR'] : null);
|
|
|
|
if (address != null) {
|
|
|
|
return ParsedAddress.thorChainAddress(address: address, name: text);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-15 10:11:53 +01:00
|
|
|
final formattedName = OpenaliasRecord.formatDomainName(text);
|
|
|
|
final domainParts = formattedName.split('.');
|
|
|
|
final name = domainParts.last;
|
2021-07-07 16:50:55 +03:00
|
|
|
|
2022-03-15 10:11:53 +01:00
|
|
|
if (domainParts.length <= 1 || domainParts.first.isEmpty || name.isEmpty) {
|
|
|
|
return ParsedAddress(addresses: [text]);
|
2021-07-07 16:50:55 +03:00
|
|
|
}
|
|
|
|
|
2022-11-11 15:55:21 +02:00
|
|
|
if (unstoppableDomains.any((domain) => name.trim() == domain)) {
|
2024-03-04 19:32:10 +02:00
|
|
|
if (settingsStore.lookupsUnstoppableDomains) {
|
2023-11-03 21:23:11 +02:00
|
|
|
final address = await fetchUnstoppableDomainAddress(text, ticker);
|
2024-12-30 20:58:58 +02:00
|
|
|
if (address.isNotEmpty) {
|
|
|
|
return ParsedAddress.fetchUnstoppableDomainAddress(address: address, name: text);
|
|
|
|
}
|
2023-11-03 21:23:11 +02:00
|
|
|
}
|
2022-03-15 10:11:53 +01:00
|
|
|
}
|
2021-07-07 16:50:55 +03:00
|
|
|
|
2025-02-17 23:05:44 +02:00
|
|
|
final bip353AddressMap = await Bip353Record.fetchUriByCryptoCurrency(text, ticker);
|
|
|
|
|
|
|
|
if (bip353AddressMap != null && bip353AddressMap.isNotEmpty) {
|
|
|
|
final chosenAddress = await Bip353Record.pickBip353AddressChoice(context, text, bip353AddressMap);
|
|
|
|
if (chosenAddress != null) {
|
|
|
|
return ParsedAddress.fetchBip353AddressAddress(address: chosenAddress, name: text);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-29 11:58:19 -04:00
|
|
|
if (text.endsWith(".eth")) {
|
2023-11-03 21:23:11 +02:00
|
|
|
if (settingsStore.lookupsENS) {
|
|
|
|
final address = await EnsRecord.fetchEnsAddress(text, wallet: wallet);
|
|
|
|
if (address.isNotEmpty && address != "0x0000000000000000000000000000000000000000") {
|
|
|
|
return ParsedAddress.fetchEnsAddress(name: text, address: address);
|
|
|
|
}
|
2023-09-25 09:47:39 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 21:39:08 +02:00
|
|
|
if (formattedName.contains(".")) {
|
2024-03-04 19:32:10 +02:00
|
|
|
if (settingsStore.lookupsOpenAlias) {
|
2023-11-03 21:23:11 +02:00
|
|
|
final txtRecord = await OpenaliasRecord.lookupOpenAliasRecord(formattedName);
|
2024-12-30 20:58:58 +02:00
|
|
|
|
2023-11-03 21:23:11 +02:00
|
|
|
if (txtRecord != null) {
|
|
|
|
final record = await OpenaliasRecord.fetchAddressAndName(
|
2024-06-25 18:52:31 +02:00
|
|
|
formattedName: formattedName, ticker: ticker.toLowerCase(), txtRecord: txtRecord);
|
2023-11-03 21:23:11 +02:00
|
|
|
return ParsedAddress.fetchOpenAliasAddress(record: record, name: text);
|
|
|
|
}
|
2023-01-31 21:39:08 +02:00
|
|
|
}
|
|
|
|
}
|
2024-01-27 04:34:38 +02:00
|
|
|
if (isEmailFormat(text)) {
|
|
|
|
final nostrProfile = await NostrProfileHandler.queryProfile(context, text);
|
|
|
|
if (nostrProfile?.relays != null) {
|
|
|
|
final nostrUserData =
|
|
|
|
await NostrProfileHandler.processRelays(context, nostrProfile!, text);
|
|
|
|
|
|
|
|
if (nostrUserData != null) {
|
2024-09-20 14:24:25 +00:00
|
|
|
String? addressFromBio = extractAddressByType(raw: nostrUserData.about, type: currency);
|
2025-01-28 23:53:43 +02:00
|
|
|
if (addressFromBio != null && addressFromBio.isNotEmpty) {
|
2024-03-04 19:32:10 +02:00
|
|
|
return ParsedAddress.nostrAddress(
|
|
|
|
address: addressFromBio,
|
|
|
|
name: text,
|
|
|
|
profileImageUrl: nostrUserData.picture,
|
|
|
|
profileName: nostrUserData.name);
|
2024-01-27 04:34:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-03-15 10:11:53 +01:00
|
|
|
} catch (e) {
|
2024-12-09 12:23:59 -06:00
|
|
|
printV(e.toString());
|
2021-07-07 16:50:55 +03:00
|
|
|
}
|
|
|
|
|
2022-03-15 10:11:53 +01:00
|
|
|
return ParsedAddress(addresses: [text]);
|
2021-07-07 16:50:55 +03:00
|
|
|
}
|
2022-01-14 14:18:03 +01:00
|
|
|
}
|