[ingan.elements] updates - checking account and beneficiary

in Steem Dev4 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)

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.029
BTC 67402.68
ETH 3481.04
USDT 1.00
SBD 2.65