@ercworldio/blockchain-shared 1.0.3-dev.3-PROJ-1296.18 → 1.0.3-dev.3-PROJ-1296.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/contracts/Escrow.d.ts +4 -4
- package/build/contracts/EscrowErrors.d.ts +1 -1
- package/build/contracts/EscrowErrors.d.ts.map +1 -1
- package/build/contracts/artifacts/Escrow.json +0 -6
- package/build/errors/errors.d.ts +12 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +28 -2
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ declare class EscrowInteraction extends Errors {
|
|
|
44
44
|
transactionHash: null;
|
|
45
45
|
receipt: null;
|
|
46
46
|
error: {
|
|
47
|
-
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
47
|
+
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
48
48
|
message: string;
|
|
49
49
|
data?: any;
|
|
50
50
|
};
|
|
@@ -61,7 +61,7 @@ declare class EscrowInteraction extends Errors {
|
|
|
61
61
|
transactionHash: null;
|
|
62
62
|
receipt: null;
|
|
63
63
|
error: {
|
|
64
|
-
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
64
|
+
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
65
65
|
message: string;
|
|
66
66
|
data?: any;
|
|
67
67
|
};
|
|
@@ -108,7 +108,7 @@ declare class EscrowInteraction extends Errors {
|
|
|
108
108
|
receipt: null;
|
|
109
109
|
executed_at: Date;
|
|
110
110
|
error: {
|
|
111
|
-
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
111
|
+
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
112
112
|
message: string;
|
|
113
113
|
data?: any;
|
|
114
114
|
};
|
|
@@ -148,7 +148,7 @@ declare class EscrowInteraction extends Errors {
|
|
|
148
148
|
transactionHash: null;
|
|
149
149
|
receipt: null;
|
|
150
150
|
error: {
|
|
151
|
-
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
151
|
+
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
152
152
|
message: string;
|
|
153
153
|
data?: any;
|
|
154
154
|
};
|
|
@@ -59,7 +59,7 @@ export interface NotAuthorizedError {
|
|
|
59
59
|
name: "NotAuthorized";
|
|
60
60
|
args: [];
|
|
61
61
|
}
|
|
62
|
-
type ErrorName = "NotAuthorized" | "NotAdmin" | "TransferError" | "InsufficientReserves" | "InsufficientBalance" | "TokenNotAllowed" | "DepositOnlyERC20" | "EtherDirectTransferNotAllowed" | "RequestAlreadyFulfilled" | "ZeroAddress" | "ZeroValue" | "SignatureAlreadyUsed" | "InvalidSignature" | "ContractPaused" | "ContractBusy" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
62
|
+
type ErrorName = "NotAuthorized" | "NotAdmin" | "TransferError" | "InsufficientReserves" | "InsufficientBalance" | "TokenNotAllowed" | "DepositOnlyERC20" | "EtherDirectTransferNotAllowed" | "RequestAlreadyFulfilled" | "ZeroAddress" | "ZeroValue" | "SignatureAlreadyUsed" | "InvalidSignature" | "ContractPaused" | "ContractBusy" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
63
63
|
export interface EscrowErrorMessage {
|
|
64
64
|
name: ErrorName;
|
|
65
65
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EscrowErrors.d.ts","sourceRoot":"","sources":["../../src/contracts/EscrowErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,yBAAyB,CAAC;IAChC,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,kCAAkC;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,kBAAkB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AE,eAAe,CAAC;IACtB,IAAI,EAAE,EAAE,CAAC;CACZ;AAID,KAAK,SAAS,GACR,eAAe,GACf,UAAU,GACV,eAAe,GACf,sBAAsB,GACtB,qBAAqB,GACrB,iBAAiB,GACjB,kBAAkB,GAClB,+BAA+B,GAC/B,yBAAyB,GACzB,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,kBAAkB,GAClB,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,YAAY,GACZ,cAAc,GACd,cAAc,GACd,2BAA2B,GAC3B,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,2BAA2B,GAC3B,6BAA6B,GAC7B,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,2BAA2B,GAC3B,sBAAsB,GACtB,6BAA6B,GAC7B,iBAAiB,GACjB,iBAAiB,GACjB,oBAAoB,GACpB,2BAA2B,GAC3B,yBAAyB,CAAA;AAE/B,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iBAAiB,GAAI,cAAc,gBAAgB,KAAG,kBAgDlE,CAAC"}
|
package/build/errors/errors.d.ts
CHANGED
|
@@ -65,6 +65,10 @@ export declare const ErrorMessages: {
|
|
|
65
65
|
readonly INSUFFICIENT_ENERGY_WALLET_BALANCE: "Rent energy wallet has insufficient balance";
|
|
66
66
|
readonly RENT_ENERGY_MIN_WITHDRAWAL_ERROR: "Minimum withdrawal of 50TRX required.";
|
|
67
67
|
readonly TELEGRAM_ALREADY_CONNECTED: "Telegram account is already connected";
|
|
68
|
+
readonly MAX_BATCH_SIZE_EXCEEDED: "Maximum batch size is exceeded";
|
|
69
|
+
readonly FAILED_SCHEDULE_WITHDRAWAL: "Scheduling withdrawal failed";
|
|
70
|
+
readonly FAILED_EXECUTE_WITHDRAWAL: "Failed to execute scheduled withdrawal";
|
|
71
|
+
readonly FAILED_CANCEL_WITHDRAWAL: "Failed to cancel scheduled withdrawal";
|
|
68
72
|
};
|
|
69
73
|
export declare const ErrorCodes: {
|
|
70
74
|
readonly INTERNAL_SERVER: "error.internal_server_error";
|
|
@@ -126,6 +130,10 @@ export declare const ErrorCodes: {
|
|
|
126
130
|
readonly INSUFFICIENT_ENERGY_WALLET_BALANCE: "error.insufficient_energy_wallet_balance";
|
|
127
131
|
readonly RENT_ENERGY_MIN_WITHDRAWAL_ERROR: "error.rent_energy_min_withdrawal_error";
|
|
128
132
|
readonly TELEGRAM_ALREADY_CONNECTED: "error.telegram_already_connected";
|
|
133
|
+
readonly MAX_BATCH_SIZE_EXCEEDED: "error.max_batch_size_exceeded";
|
|
134
|
+
readonly FAILED_SCHEDULE_WITHDRAWAL: "error.failed_schedule_withdrawal";
|
|
135
|
+
readonly FAILED_EXECUTE_WITHDRAWAL: "error.failed_execute_withdrawal";
|
|
136
|
+
readonly FAILED_CANCEL_WITHDRAWAL: "error.failed_cancel_withdrawal";
|
|
129
137
|
};
|
|
130
138
|
export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes];
|
|
131
139
|
export interface ErrorCodeEntry {
|
|
@@ -211,6 +219,10 @@ declare class BaseErrors {
|
|
|
211
219
|
InsufficientRentEnergyWalletBalance(): "Rent energy wallet has insufficient balance";
|
|
212
220
|
RentEnergyMinWithdrawalError(): "Minimum withdrawal of 50TRX required.";
|
|
213
221
|
TelegramAlreadyConnected(): "Telegram account is already connected";
|
|
222
|
+
MaxBatchSizeExceeded(): "Maximum batch size is exceeded";
|
|
223
|
+
FailedScheduleWithdrawal(): "Scheduling withdrawal failed";
|
|
224
|
+
FailedExecuteWithdrawal(): "Failed to execute scheduled withdrawal";
|
|
225
|
+
FailedCancelWithdrawal(): "Failed to cancel scheduled withdrawal";
|
|
214
226
|
/** Handler methods */
|
|
215
227
|
handle_error: (error: any, source_method: string) => ErrorHandlerResponse;
|
|
216
228
|
get_error_code_base: (message: string) => ErrorCodeEntry | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors/errors.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqFtB,2BAA2B;;;;IAK3B,sBAAsB
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors/errors.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqFtB,2BAA2B;;;;IAK3B,sBAAsB;;;;;;;;;;;;;;CAqBhB,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Eb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEnE,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;CACzB;AAED,UAAU,oBAAoB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,cAAc;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM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kBAAkB;IAClB,mCAAmC;IACnC,4BAA4B;IAC5B,wBAAwB;IACxB,oBAAoB;IACpB,wBAAwB;IACxB,uBAAuB;IACvB,sBAAsB;IAG7B,sBAAsB;IACf,YAAY,GAAI,OAAO,GAAG,EAAE,eAAe,MAAM,KAAG,oBAAoB,CAuB9E;IAEM,mBAAmB,GAAI,SAAS,MAAM,KAAG,cAAc,GAAG,IAAI,CAwCpE;CACJ;AAED,eAAe,UAAU,CAAC"}
|
package/build/errors/errors.js
CHANGED
|
@@ -102,7 +102,12 @@ exports.ErrorMessages = {
|
|
|
102
102
|
RENT_ENERGY_API_ERROR: `Encountered error when calling rent API`, // 500
|
|
103
103
|
INSUFFICIENT_ENERGY_WALLET_BALANCE: `Rent energy wallet has insufficient balance`,
|
|
104
104
|
RENT_ENERGY_MIN_WITHDRAWAL_ERROR: `Minimum withdrawal of 50TRX required.`,
|
|
105
|
-
TELEGRAM_ALREADY_CONNECTED: `Telegram account is already connected
|
|
105
|
+
TELEGRAM_ALREADY_CONNECTED: `Telegram account is already connected`, // 409
|
|
106
|
+
/// Multisig
|
|
107
|
+
MAX_BATCH_SIZE_EXCEEDED: `Maximum batch size is exceeded`,
|
|
108
|
+
FAILED_SCHEDULE_WITHDRAWAL: `Scheduling withdrawal failed`,
|
|
109
|
+
FAILED_EXECUTE_WITHDRAWAL: `Failed to execute scheduled withdrawal`,
|
|
110
|
+
FAILED_CANCEL_WITHDRAWAL: `Failed to cancel scheduled withdrawal`,
|
|
106
111
|
};
|
|
107
112
|
exports.ErrorCodes = {
|
|
108
113
|
INTERNAL_SERVER: 'error.internal_server_error',
|
|
@@ -169,7 +174,12 @@ exports.ErrorCodes = {
|
|
|
169
174
|
RENT_ENERGY_API_ERROR: `error.rent_enegy_api_error`,
|
|
170
175
|
INSUFFICIENT_ENERGY_WALLET_BALANCE: `error.insufficient_energy_wallet_balance`,
|
|
171
176
|
RENT_ENERGY_MIN_WITHDRAWAL_ERROR: `error.rent_energy_min_withdrawal_error`,
|
|
172
|
-
TELEGRAM_ALREADY_CONNECTED: `error.telegram_already_connected
|
|
177
|
+
TELEGRAM_ALREADY_CONNECTED: `error.telegram_already_connected`,
|
|
178
|
+
/// Multisig
|
|
179
|
+
MAX_BATCH_SIZE_EXCEEDED: `error.max_batch_size_exceeded`,
|
|
180
|
+
FAILED_SCHEDULE_WITHDRAWAL: `error.failed_schedule_withdrawal`,
|
|
181
|
+
FAILED_EXECUTE_WITHDRAWAL: `error.failed_execute_withdrawal`,
|
|
182
|
+
FAILED_CANCEL_WITHDRAWAL: `error.failed_cancel_withdrawal`,
|
|
173
183
|
};
|
|
174
184
|
class BaseErrors {
|
|
175
185
|
constructor() {
|
|
@@ -275,6 +285,14 @@ class BaseErrors {
|
|
|
275
285
|
return Object.assign(Object.assign({}, this.codes[400]), { error_code: exports.ErrorCodes.RENT_ENERGY_MIN_WITHDRAWAL_ERROR });
|
|
276
286
|
if (message.includes(exports.ErrorMessages.TELEGRAM_ALREADY_CONNECTED))
|
|
277
287
|
return Object.assign(Object.assign({}, this.codes[409]), { error_code: exports.ErrorCodes.TELEGRAM_ALREADY_CONNECTED });
|
|
288
|
+
if (message.includes(exports.ErrorMessages.MAX_BATCH_SIZE_EXCEEDED))
|
|
289
|
+
return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.MAX_BATCH_SIZE_EXCEEDED });
|
|
290
|
+
if (message.includes(exports.ErrorMessages.FAILED_SCHEDULE_WITHDRAWAL))
|
|
291
|
+
return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.FAILED_SCHEDULE_WITHDRAWAL });
|
|
292
|
+
if (message.includes(exports.ErrorMessages.FAILED_EXECUTE_WITHDRAWAL))
|
|
293
|
+
return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.FAILED_EXECUTE_WITHDRAWAL });
|
|
294
|
+
if (message.includes(exports.ErrorMessages.FAILED_CANCEL_WITHDRAWAL))
|
|
295
|
+
return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.FAILED_CANCEL_WITHDRAWAL });
|
|
278
296
|
return null;
|
|
279
297
|
};
|
|
280
298
|
}
|
|
@@ -345,5 +363,13 @@ class BaseErrors {
|
|
|
345
363
|
;
|
|
346
364
|
TelegramAlreadyConnected() { return exports.ErrorMessages.TELEGRAM_ALREADY_CONNECTED; }
|
|
347
365
|
;
|
|
366
|
+
MaxBatchSizeExceeded() { return exports.ErrorMessages.MAX_BATCH_SIZE_EXCEEDED; }
|
|
367
|
+
;
|
|
368
|
+
FailedScheduleWithdrawal() { return exports.ErrorMessages.FAILED_SCHEDULE_WITHDRAWAL; }
|
|
369
|
+
;
|
|
370
|
+
FailedExecuteWithdrawal() { return exports.ErrorMessages.FAILED_EXECUTE_WITHDRAWAL; }
|
|
371
|
+
;
|
|
372
|
+
FailedCancelWithdrawal() { return exports.ErrorMessages.FAILED_CANCEL_WITHDRAWAL; }
|
|
373
|
+
;
|
|
348
374
|
}
|
|
349
375
|
exports.default = BaseErrors;
|
package/package.json
CHANGED