diff --git a/src/app_service/service/community_tokens/dto/community_token.nim b/src/app_service/service/community_tokens/dto/community_token.nim index 2b1faa8864..44f8078768 100644 --- a/src/app_service/service/community_tokens/dto/community_token.nim +++ b/src/app_service/service/community_tokens/dto/community_token.nim @@ -159,5 +159,6 @@ type Success, Infura, Balance, + Revert, Other diff --git a/src/app_service/service/community_tokens/service.nim b/src/app_service/service/community_tokens/service.nim index f1c9ae4bdf..9eb845b947 100644 --- a/src/app_service/service/community_tokens/service.nim +++ b/src/app_service/service/community_tokens/service.nim @@ -1018,6 +1018,8 @@ QtObject: var errorCode = ComputeFeeErrorCode.Other if errorMessage.contains("403 Forbidden") or errorMessage.contains("exceed"): errorCode = ComputeFeeErrorCode.Infura + if errorMessage.contains("execution reverted"): + errorCode = ComputeFeeErrorCode.Revert return errorCode proc burnTokens*(self: Service, communityId: string, password: string, contractUniqueKey: string, amount: Uint256, addressFrom: string) = diff --git a/ui/app/AppLayouts/Communities/helpers/AirdropFeesSubscriber.qml b/ui/app/AppLayouts/Communities/helpers/AirdropFeesSubscriber.qml index 9426e22b46..142dad70d7 100644 --- a/ui/app/AppLayouts/Communities/helpers/AirdropFeesSubscriber.qml +++ b/ui/app/AppLayouts/Communities/helpers/AirdropFeesSubscriber.qml @@ -46,6 +46,9 @@ QtObject { if (airdropFeesResponse.errorCode === Constants.ComputeFeeErrorCode.Infura) return qsTr("Infura error") + if (airdropFeesResponse.errorCode === Constants.ComputeFeeErrorCode.Revert) + return qsTr("Estimation reverted. Make sure you are using the account that owns the TokenMaster or Owner Token.") + return qsTr("Unknown error") } readonly property string totalFee: { diff --git a/ui/imports/utils/Constants.qml b/ui/imports/utils/Constants.qml index ffac945cfb..2ed019f705 100644 --- a/ui/imports/utils/Constants.qml +++ b/ui/imports/utils/Constants.qml @@ -1057,6 +1057,7 @@ QtObject { Success, Infura, Balance, + Revert, Other }