[ingan.elements] updates - checking account and beneficiary

in hive-151113 •  8 months ago 

The development of the ingan.elements is in good progress.

Here are some updates.

Account Checking

This dapp is to exchange steem accounts. So when a user registers an account, it should be checked if the account

  • is a steem account
  • is not already registered

So I implemented the logic to check these conditions.


If the account to sell is not available, then the dapp shows an error message like this:

To check if the account is on steem, it is quite simple to check like this:

   Future<bool> checkAccountAvailable({required String accountName}) async {
    final params = [accountName];
    try {
      final account = await promiseToFuture(
          client.call2('database_api', 'get_accounts', [params]));
      if (account.isEmpty) {
        printWarning('account: $accountName for the username is available');
        return true;
      }
    } catch (error) {
      printError('failed to check account availability $error');
    }
    return false;
  }

Note that it is a Dart (for Flutter app) code using dsteem.

Adding Beneficiaries

When a user clicks the option button, the user can add beneficiaries.



I hope that this dapp will be open as a beta soon.

cc.
@pennsif
@steemcurator01


Posted through the ECblog app (https://blog.etain.club)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This post has been featured in the latest edition of Steem News...