File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/subscription-controller/src Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,18 @@ export const SUBSCRIPTION_STATUSES = {
41
41
export type SubscriptionStatus =
42
42
( typeof SUBSCRIPTION_STATUSES ) [ keyof typeof SUBSCRIPTION_STATUSES ] ;
43
43
44
+ export const CRYPTO_PAYMENT_METHOD_ERRORS = {
45
+ APPROVAL_TRANSACTION_TOO_OLD : 'approval_transaction_too_old' ,
46
+ APPROVAL_TRANSACTION_REVERTED : 'approval_transaction_reverted' ,
47
+ APPROVAL_TRANSACTION_MAX_VERIFICATION_ATTEMPTS_REACHED :
48
+ 'approval_transaction_max_verification_attempts_reached' ,
49
+ INSUFFICIENT_BALANCE : 'insufficient_balance' ,
50
+ INSUFFICIENT_ALLOWANCE : 'insufficient_allowance' ,
51
+ } as const ;
52
+
53
+ export type CryptoPaymentMethodError =
54
+ ( typeof CRYPTO_PAYMENT_METHOD_ERRORS ) [ keyof typeof CRYPTO_PAYMENT_METHOD_ERRORS ] ;
55
+
44
56
/** only usd for now */
45
57
export type Currency = 'usd' ;
46
58
@@ -86,6 +98,7 @@ export type SubscriptionCryptoPaymentMethod = {
86
98
payerAddress : Hex ;
87
99
chainId : Hex ;
88
100
tokenSymbol : string ;
101
+ error ?: CryptoPaymentMethodError ;
89
102
} ;
90
103
} ;
91
104
You can’t perform that action at this time.
0 commit comments