CW-491-Send-to-Mastodon-username-addresses (#1107)

* Send to Mastodon username addresses

* Update mastodon_user.dart

* Enhance Eth out of gas error condition
Remove some code warnings [skip ci]

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
Serhii
2023-10-05 15:18:35 +03:00
committed by GitHub
co-authored by OmarHatem
parent bad9b4c608
commit b414893211
7 changed files with 162 additions and 15 deletions
+1 -2
View File
@@ -1,4 +1,3 @@
import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/entities/priority_for_wallet_type.dart';
import 'package:cake_wallet/entities/transaction_description.dart';
import 'package:cake_wallet/ethereum/ethereum.dart';
@@ -430,7 +429,7 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
String translateErrorMessage(String error, WalletType walletType, CryptoCurrency currency,) {
if (walletType == WalletType.ethereum || walletType == WalletType.haven) {
if (error.contains('gas required exceeds allowance') || error.contains('insufficient funds for gas')) {
if (error.contains('gas required exceeds allowance') || error.contains('insufficient funds for')) {
return S.current.do_not_have_enough_gas_asset(currency.toString());
}
}