-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove dao #2058
remove dao #2058
Conversation
95a4fc0
to
397c29e
Compare
Signed-off-by: phuoc <[email protected]>
Signed-off-by: phuoc <[email protected]>
397c29e
to
30ce1bd
Compare
Signed-off-by: phuoc <[email protected]>
30ce1bd
to
a398bd3
Compare
Signed-off-by: phuoc <[email protected]>
Signed-off-by: phuoc <[email protected]>
2103618
to
b1d10f6
Compare
if (event.getEth && | ||
addresses.none( | ||
(element) => element.cryptoType == CryptoType.ETH.source)) { | ||
final ethAddress = | ||
await persona.insertNextAddress(WalletType.Ethereum); | ||
await _accountService.insertNextAddress(WalletType.Ethereum); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should replace persona with walletAddress
@@ -238,24 +216,18 @@ class AccountsBloc extends AuBloc<AccountsEvent, AccountsState> { | |||
|
|||
Future<List<Account>> getAccountPersona( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove Persona here
@@ -84,15 +75,13 @@ class Account { | |||
|
|||
bool get isUsdc => blockchain == 'USDC'; | |||
|
|||
String get className => | |||
persona != null && walletAddress != null ? 'Persona' : 'Connection'; | |||
String get className => walletAddress != null ? 'Persona' : 'Connection'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove persona
if (state.personaAddresses?[event.uuid] != null) return; | ||
final address = await (await _accountService.getPersona(uuid: event.uuid)) | ||
.wallet() | ||
if (state.personaAddresses?[event.uuid] != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
walletAddresses?
if (addresses.isEmpty) { | ||
final defaultPersona = await accountService.getOrCreateDefaultPersona(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make sure here we already have primary address
@@ -54,9 +55,11 @@ class _SelectAddressesPageState extends State<SelectAddressesPage> { | |||
} | |||
|
|||
Future<void> fetchImportedAddresses() async { | |||
final importedAddresses = await widget.payload.persona.getAddresses(); | |||
final importedAddresses = await injector<CloudDatabase>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use addressService
Signed-off-by: phuoc <[email protected]>
@@ -39,34 +43,16 @@ class AddressService { | |||
} | |||
final allEthAddresses = await getAllEthereumAddress(); | |||
if (allEthAddresses.isEmpty) { | |||
await deriveAddressesFromAllPersona(); | |||
await injector<AccountService>().insertAddressAtIndexAndUuid( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should derive addresses from all UUIDs
Future<AddressInfo?> getPrimaryAddressInfo() async { | ||
final addressInfo = await _primaryAddressChannel.getPrimaryAddress(); | ||
final addressInfo = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about set _primaryAddressInfo
to new value?
} | ||
|
||
@override | ||
Future<Persona> importPersona(String words, String passphrase, | ||
Future<WalletStorage> importPersona(String words, String passphrase, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
importWalletStorage
final Persona defaultPersona = await getDefaultPersona(); | ||
return LibAukDart.getWallet(defaultPersona.uuid); | ||
final primaryWallet = await getPrimaryWallet(); | ||
return LibAukDart.getWallet(primaryWallet.uuid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use primaryWallet.wallet()
walletAddresses = [ | ||
await _generateTezosAddressByIndex(uuid, index, name: name), | ||
]; | ||
case WalletType.Autonomy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it be removed?
Description
Describe your changes