fairDataSociety / fdp-contracts

Fair Data Protocol smart contracts and its utilities
4 stars 1 forks source link

use `estimateGas` when checking account balance for transaction #94

Closed nugaon closed 1 year ago

nugaon commented 1 year ago

Currently, before sending transaction in registerUsername, it only checks a whether the balance of the address is higher than a constant value 10000000000000000 wei.
https://github.com/fairDataSociety/fdp-contracts/blob/master/js-library/src/services/ens.ts#L114 Instead of that, some other dynamic solution could be used such as estimateGas on the register method.

tomicvladan commented 1 year ago

Implemented in https://github.com/fairDataSociety/fdp-contracts/pull/105