Skip to content
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

Closed
wants to merge 6 commits into from
Closed

remove dao #2058

wants to merge 6 commits into from

Conversation

phuocbitmark
Copy link
Contributor

Description

Describe your changes

  • Added a function A to process data B
  • Created new column C to store D state
  • Refactor workflow E to improve performance because of F

Signed-off-by: phuoc <[email protected]>
if (event.getEth &&
addresses.none(
(element) => element.cryptoType == CryptoType.ETH.source)) {
final ethAddress =
await persona.insertNextAddress(WalletType.Ethereum);
await _accountService.insertNextAddress(WalletType.Ethereum);
Copy link
Collaborator

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(
Copy link
Collaborator

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';
Copy link
Collaborator

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) {
Copy link
Collaborator

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();
Copy link
Collaborator

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>()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use addressService

@@ -39,34 +43,16 @@ class AddressService {
}
final allEthAddresses = await getAllEthereumAddress();
if (allEthAddresses.isEmpty) {
await deriveAddressesFromAllPersona();
await injector<AccountService>().insertAddressAtIndexAndUuid(
Copy link
Collaborator

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 =
Copy link
Collaborator

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,
Copy link
Collaborator

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);
Copy link
Collaborator

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants