mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Generic fixes (#1274)
* Display fees currency as wallet currency not the selected one * remove unused code catch balance network issues * pop send screen when send completes successfully * revert change [skip ci] * Enable restoring haven wallets * verify context is mounted before showing snackbar [skip ci] * Update privacy [skip ci] * Add user consent popup to inapp webview permission request
This commit is contained in:
parent
aed60a7282
commit
89fdc0f4d1
36 changed files with 134 additions and 86 deletions
|
@ -190,11 +190,15 @@ I/flutter ( 4474): Gas Used: 53000
|
|||
Future<ERC20Balance> fetchERC20Balances(
|
||||
EthereumAddress userAddress, String contractAddress) async {
|
||||
final erc20 = ERC20(address: EthereumAddress.fromHex(contractAddress), client: _client!);
|
||||
final balance = await erc20.balanceOf(userAddress);
|
||||
try {
|
||||
final balance = await erc20.balanceOf(userAddress);
|
||||
|
||||
int exponent = (await erc20.decimals()).toInt();
|
||||
int exponent = (await erc20.decimals()).toInt();
|
||||
|
||||
return ERC20Balance(balance, exponent: exponent);
|
||||
return ERC20Balance(balance, exponent: exponent);
|
||||
} catch (_) {
|
||||
return ERC20Balance(BigInt.zero);
|
||||
}
|
||||
}
|
||||
|
||||
Future<Erc20Token?> getErc20Token(String contractAddress) async {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue