@yaswap/error-parser 2.0.0
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/CHANGELOG.md +469 -0
- package/README.md +117 -0
- package/dist/package.json +34 -0
- package/dist/src/LiqualityErrors/DappNotConnectedError.d.ts +9 -0
- package/dist/src/LiqualityErrors/DappNotConnectedError.js +15 -0
- package/dist/src/LiqualityErrors/DappNotConnectedError.js.map +1 -0
- package/dist/src/LiqualityErrors/DuplicateTokenSymbolError.d.ts +4 -0
- package/dist/src/LiqualityErrors/DuplicateTokenSymbolError.js +12 -0
- package/dist/src/LiqualityErrors/DuplicateTokenSymbolError.js.map +1 -0
- package/dist/src/LiqualityErrors/HighInputAmountError.d.ts +9 -0
- package/dist/src/LiqualityErrors/HighInputAmountError.js +15 -0
- package/dist/src/LiqualityErrors/HighInputAmountError.js.map +1 -0
- package/dist/src/LiqualityErrors/InsufficientFundsError.d.ts +9 -0
- package/dist/src/LiqualityErrors/InsufficientFundsError.js +12 -0
- package/dist/src/LiqualityErrors/InsufficientFundsError.js.map +1 -0
- package/dist/src/LiqualityErrors/InsufficientGasFeeError.d.ts +8 -0
- package/dist/src/LiqualityErrors/InsufficientGasFeeError.js +12 -0
- package/dist/src/LiqualityErrors/InsufficientGasFeeError.js.map +1 -0
- package/dist/src/LiqualityErrors/InsufficientInputAmountError.d.ts +8 -0
- package/dist/src/LiqualityErrors/InsufficientInputAmountError.js +12 -0
- package/dist/src/LiqualityErrors/InsufficientInputAmountError.js.map +1 -0
- package/dist/src/LiqualityErrors/InsufficientLiquidityError.d.ts +10 -0
- package/dist/src/LiqualityErrors/InsufficientLiquidityError.js +15 -0
- package/dist/src/LiqualityErrors/InsufficientLiquidityError.js.map +1 -0
- package/dist/src/LiqualityErrors/InternalError.d.ts +5 -0
- package/dist/src/LiqualityErrors/InternalError.js +15 -0
- package/dist/src/LiqualityErrors/InternalError.js.map +1 -0
- package/dist/src/LiqualityErrors/LedgerAppMismatchError.d.ts +4 -0
- package/dist/src/LiqualityErrors/LedgerAppMismatchError.js +12 -0
- package/dist/src/LiqualityErrors/LedgerAppMismatchError.js.map +1 -0
- package/dist/src/LiqualityErrors/LedgerDappConflictError.d.ts +4 -0
- package/dist/src/LiqualityErrors/LedgerDappConflictError.js +12 -0
- package/dist/src/LiqualityErrors/LedgerDappConflictError.js.map +1 -0
- package/dist/src/LiqualityErrors/LedgerDeviceConnectionError.d.ts +4 -0
- package/dist/src/LiqualityErrors/LedgerDeviceConnectionError.js +12 -0
- package/dist/src/LiqualityErrors/LedgerDeviceConnectionError.js.map +1 -0
- package/dist/src/LiqualityErrors/LedgerDeviceLockedError.d.ts +4 -0
- package/dist/src/LiqualityErrors/LedgerDeviceLockedError.js +12 -0
- package/dist/src/LiqualityErrors/LedgerDeviceLockedError.js.map +1 -0
- package/dist/src/LiqualityErrors/LedgerDeviceNotUpdatedError.d.ts +4 -0
- package/dist/src/LiqualityErrors/LedgerDeviceNotUpdatedError.js +12 -0
- package/dist/src/LiqualityErrors/LedgerDeviceNotUpdatedError.js.map +1 -0
- package/dist/src/LiqualityErrors/LedgerDeviceSmartContractTransactionDisabledError.d.ts +4 -0
- package/dist/src/LiqualityErrors/LedgerDeviceSmartContractTransactionDisabledError.js +12 -0
- package/dist/src/LiqualityErrors/LedgerDeviceSmartContractTransactionDisabledError.js.map +1 -0
- package/dist/src/LiqualityErrors/LiqualityError.d.ts +22 -0
- package/dist/src/LiqualityErrors/LiqualityError.js +39 -0
- package/dist/src/LiqualityErrors/LiqualityError.js.map +1 -0
- package/dist/src/LiqualityErrors/LowSpeedupFeeError.d.ts +4 -0
- package/dist/src/LiqualityErrors/LowSpeedupFeeError.js +12 -0
- package/dist/src/LiqualityErrors/LowSpeedupFeeError.js.map +1 -0
- package/dist/src/LiqualityErrors/NoActiveWalletError.d.ts +5 -0
- package/dist/src/LiqualityErrors/NoActiveWalletError.js +15 -0
- package/dist/src/LiqualityErrors/NoActiveWalletError.js.map +1 -0
- package/dist/src/LiqualityErrors/NoTipError.d.ts +4 -0
- package/dist/src/LiqualityErrors/NoTipError.js +12 -0
- package/dist/src/LiqualityErrors/NoTipError.js.map +1 -0
- package/dist/src/LiqualityErrors/PairNotSupportedError.d.ts +8 -0
- package/dist/src/LiqualityErrors/PairNotSupportedError.js +12 -0
- package/dist/src/LiqualityErrors/PairNotSupportedError.js.map +1 -0
- package/dist/src/LiqualityErrors/PasswordError.d.ts +4 -0
- package/dist/src/LiqualityErrors/PasswordError.js +12 -0
- package/dist/src/LiqualityErrors/PasswordError.js.map +1 -0
- package/dist/src/LiqualityErrors/SlippageTooHighError.d.ts +9 -0
- package/dist/src/LiqualityErrors/SlippageTooHighError.js +12 -0
- package/dist/src/LiqualityErrors/SlippageTooHighError.js.map +1 -0
- package/dist/src/LiqualityErrors/ThirdPartyError.d.ts +9 -0
- package/dist/src/LiqualityErrors/ThirdPartyError.js +23 -0
- package/dist/src/LiqualityErrors/ThirdPartyError.js.map +1 -0
- package/dist/src/LiqualityErrors/UnknownError.d.ts +5 -0
- package/dist/src/LiqualityErrors/UnknownError.js +13 -0
- package/dist/src/LiqualityErrors/UnknownError.js.map +1 -0
- package/dist/src/LiqualityErrors/UserDeclinedError.d.ts +5 -0
- package/dist/src/LiqualityErrors/UserDeclinedError.js +15 -0
- package/dist/src/LiqualityErrors/UserDeclinedError.js.map +1 -0
- package/dist/src/LiqualityErrors/ValidationError.d.ts +5 -0
- package/dist/src/LiqualityErrors/ValidationError.js +15 -0
- package/dist/src/LiqualityErrors/ValidationError.js.map +1 -0
- package/dist/src/LiqualityErrors/VeryHighMaxFeeWarning.d.ts +7 -0
- package/dist/src/LiqualityErrors/VeryHighMaxFeeWarning.js +12 -0
- package/dist/src/LiqualityErrors/VeryHighMaxFeeWarning.js.map +1 -0
- package/dist/src/LiqualityErrors/VeryHighTipWarning.d.ts +4 -0
- package/dist/src/LiqualityErrors/VeryHighTipWarning.js +12 -0
- package/dist/src/LiqualityErrors/VeryHighTipWarning.js.map +1 -0
- package/dist/src/LiqualityErrors/VeryLowMaxFeeError.d.ts +7 -0
- package/dist/src/LiqualityErrors/VeryLowMaxFeeError.js +12 -0
- package/dist/src/LiqualityErrors/VeryLowMaxFeeError.js.map +1 -0
- package/dist/src/LiqualityErrors/VeryLowTipError.d.ts +4 -0
- package/dist/src/LiqualityErrors/VeryLowTipError.js +12 -0
- package/dist/src/LiqualityErrors/VeryLowTipError.js.map +1 -0
- package/dist/src/LiqualityErrors/WalletLockedError.d.ts +5 -0
- package/dist/src/LiqualityErrors/WalletLockedError.js +15 -0
- package/dist/src/LiqualityErrors/WalletLockedError.js.map +1 -0
- package/dist/src/LiqualityErrors/customErrors.d.ts +91 -0
- package/dist/src/LiqualityErrors/customErrors.js +95 -0
- package/dist/src/LiqualityErrors/customErrors.js.map +1 -0
- package/dist/src/LiqualityErrors/index.d.ts +31 -0
- package/dist/src/LiqualityErrors/index.js +66 -0
- package/dist/src/LiqualityErrors/index.js.map +1 -0
- package/dist/src/config.d.ts +39 -0
- package/dist/src/config.js +43 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/factory/index.d.ts +1 -0
- package/dist/src/factory/index.js +18 -0
- package/dist/src/factory/index.js.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/parsers/Chainify/ChainifyErrorParser.d.ts +7 -0
- package/dist/src/parsers/Chainify/ChainifyErrorParser.js +63 -0
- package/dist/src/parsers/Chainify/ChainifyErrorParser.js.map +1 -0
- package/dist/src/parsers/Chainify/JsonRPCNodeErrorParser.d.ts +7 -0
- package/dist/src/parsers/Chainify/JsonRPCNodeErrorParser.js +29 -0
- package/dist/src/parsers/Chainify/JsonRPCNodeErrorParser.js.map +1 -0
- package/dist/src/parsers/Chainify/LedgerErrorParser.d.ts +7 -0
- package/dist/src/parsers/Chainify/LedgerErrorParser.js +46 -0
- package/dist/src/parsers/Chainify/LedgerErrorParser.js.map +1 -0
- package/dist/src/parsers/Chainify/index.d.ts +16 -0
- package/dist/src/parsers/Chainify/index.js +20 -0
- package/dist/src/parsers/Chainify/index.js.map +1 -0
- package/dist/src/parsers/Debridge/DebridgeAPIErrorParser.d.ts +8 -0
- package/dist/src/parsers/Debridge/DebridgeAPIErrorParser.js +48 -0
- package/dist/src/parsers/Debridge/DebridgeAPIErrorParser.js.map +1 -0
- package/dist/src/parsers/Debridge/index.d.ts +16 -0
- package/dist/src/parsers/Debridge/index.js +14 -0
- package/dist/src/parsers/Debridge/index.js.map +1 -0
- package/dist/src/parsers/ErrorParser.d.ts +8 -0
- package/dist/src/parsers/ErrorParser.js +37 -0
- package/dist/src/parsers/ErrorParser.js.map +1 -0
- package/dist/src/parsers/LifiAPI/QuoteErrorParser.d.ts +7 -0
- package/dist/src/parsers/LifiAPI/QuoteErrorParser.js +72 -0
- package/dist/src/parsers/LifiAPI/QuoteErrorParser.js.map +1 -0
- package/dist/src/parsers/LifiAPI/index.d.ts +45 -0
- package/dist/src/parsers/LifiAPI/index.js +34 -0
- package/dist/src/parsers/LifiAPI/index.js.map +1 -0
- package/dist/src/parsers/OneInchAPI/ApproveErrorParser.d.ts +7 -0
- package/dist/src/parsers/OneInchAPI/ApproveErrorParser.js +42 -0
- package/dist/src/parsers/OneInchAPI/ApproveErrorParser.js.map +1 -0
- package/dist/src/parsers/OneInchAPI/QuoteErrorParser.d.ts +4 -0
- package/dist/src/parsers/OneInchAPI/QuoteErrorParser.js +10 -0
- package/dist/src/parsers/OneInchAPI/QuoteErrorParser.js.map +1 -0
- package/dist/src/parsers/OneInchAPI/SwapErrorParser.d.ts +13 -0
- package/dist/src/parsers/OneInchAPI/SwapErrorParser.js +70 -0
- package/dist/src/parsers/OneInchAPI/SwapErrorParser.js.map +1 -0
- package/dist/src/parsers/OneInchAPI/index.d.ts +26 -0
- package/dist/src/parsers/OneInchAPI/index.js +22 -0
- package/dist/src/parsers/OneInchAPI/index.js.map +1 -0
- package/dist/src/parsers/Thorchain/ThorchainAPIErrorParser.d.ts +9 -0
- package/dist/src/parsers/Thorchain/ThorchainAPIErrorParser.js +31 -0
- package/dist/src/parsers/Thorchain/ThorchainAPIErrorParser.js.map +1 -0
- package/dist/src/parsers/Thorchain/index.d.ts +4 -0
- package/dist/src/parsers/Thorchain/index.js +8 -0
- package/dist/src/parsers/Thorchain/index.js.map +1 -0
- package/dist/src/parsers/UniswapV2/UniswapV2SwapErrorParser.d.ts +7 -0
- package/dist/src/parsers/UniswapV2/UniswapV2SwapErrorParser.js +33 -0
- package/dist/src/parsers/UniswapV2/UniswapV2SwapErrorParser.js.map +1 -0
- package/dist/src/parsers/UniswapV2/index.d.ts +4 -0
- package/dist/src/parsers/UniswapV2/index.js +8 -0
- package/dist/src/parsers/UniswapV2/index.js.map +1 -0
- package/dist/src/parsers/index.d.ts +9 -0
- package/dist/src/parsers/index.js +13 -0
- package/dist/src/parsers/index.js.map +1 -0
- package/dist/src/reporters/console.d.ts +3 -0
- package/dist/src/reporters/console.js +18 -0
- package/dist/src/reporters/console.js.map +1 -0
- package/dist/src/reporters/discord.d.ts +3 -0
- package/dist/src/reporters/discord.js +64 -0
- package/dist/src/reporters/discord.js.map +1 -0
- package/dist/src/reporters/index.d.ts +6 -0
- package/dist/src/reporters/index.js +47 -0
- package/dist/src/reporters/index.js.map +1 -0
- package/dist/src/test/chainify/jsonRPCNode.test.d.ts +1 -0
- package/dist/src/test/chainify/jsonRPCNode.test.js +49 -0
- package/dist/src/test/chainify/jsonRPCNode.test.js.map +1 -0
- package/dist/src/test/chainify/ledgerDevice.test.d.ts +1 -0
- package/dist/src/test/chainify/ledgerDevice.test.js +58 -0
- package/dist/src/test/chainify/ledgerDevice.test.js.map +1 -0
- package/dist/src/test/chainify/uniswapV2.test.d.ts +1 -0
- package/dist/src/test/chainify/uniswapV2.test.js +49 -0
- package/dist/src/test/chainify/uniswapV2.test.js.map +1 -0
- package/dist/src/test/debridgeAPI.test.d.ts +1 -0
- package/dist/src/test/debridgeAPI.test.js +58 -0
- package/dist/src/test/debridgeAPI.test.js.map +1 -0
- package/dist/src/test/index.d.ts +3 -0
- package/dist/src/test/index.js +26 -0
- package/dist/src/test/index.js.map +1 -0
- package/dist/src/test/lifi/quoteAPI.test.d.ts +1 -0
- package/dist/src/test/lifi/quoteAPI.test.js +60 -0
- package/dist/src/test/lifi/quoteAPI.test.js.map +1 -0
- package/dist/src/test/oneInch/approveAPI.test.d.ts +1 -0
- package/dist/src/test/oneInch/approveAPI.test.js +91 -0
- package/dist/src/test/oneInch/approveAPI.test.js.map +1 -0
- package/dist/src/test/oneInch/swapAPI.test.d.ts +1 -0
- package/dist/src/test/oneInch/swapAPI.test.js +125 -0
- package/dist/src/test/oneInch/swapAPI.test.js.map +1 -0
- package/dist/src/test/thorchainAPI.test.d.ts +1 -0
- package/dist/src/test/thorchainAPI.test.js +48 -0
- package/dist/src/test/thorchainAPI.test.js.map +1 -0
- package/dist/src/types/index.d.ts +26 -0
- package/dist/src/types/index.js +9 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/utils/index.d.ts +10 -0
- package/dist/src/utils/index.js +47 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +34 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
# @yaswap/error-parser
|
|
2
|
+
|
|
3
|
+
## 2.2.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [2cce88d4]
|
|
8
|
+
- @yaswap/cryptoassets@2.11.0
|
|
9
|
+
|
|
10
|
+
## 2.2.9
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [2b5bb0a5]
|
|
15
|
+
- @yaswap/cryptoassets@2.10.0
|
|
16
|
+
|
|
17
|
+
## 2.2.8
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [5a03a948]
|
|
22
|
+
- @yaswap/cryptoassets@2.9.0
|
|
23
|
+
|
|
24
|
+
## 2.2.7
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [831f1e86]
|
|
29
|
+
- @yaswap/cryptoassets@2.8.0
|
|
30
|
+
|
|
31
|
+
## 2.2.6
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [217cbda8]
|
|
36
|
+
- @yaswap/cryptoassets@2.7.0
|
|
37
|
+
|
|
38
|
+
## 2.2.5
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [1058bc36]
|
|
43
|
+
- @yaswap/cryptoassets@2.6.0
|
|
44
|
+
|
|
45
|
+
## 2.2.4
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [5391ea28]
|
|
50
|
+
- @yaswap/cryptoassets@2.5.0
|
|
51
|
+
|
|
52
|
+
## 2.2.3
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies [ef71d00]
|
|
57
|
+
- Updated dependencies [8cbbaee]
|
|
58
|
+
- @yaswap/cryptoassets@2.4.0
|
|
59
|
+
|
|
60
|
+
## 2.2.1
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- Updated dependencies [3e6dd4e]
|
|
65
|
+
- @yaswap/cryptoassets@2.3.0
|
|
66
|
+
|
|
67
|
+
## 2.2.0
|
|
68
|
+
|
|
69
|
+
### Minor Changes
|
|
70
|
+
|
|
71
|
+
- 7f7f84f: Fix thorchain url
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- Updated dependencies [7f7f84f]
|
|
76
|
+
- @yaswap/cryptoassets@2.2.0
|
|
77
|
+
|
|
78
|
+
## 2.1.0
|
|
79
|
+
|
|
80
|
+
### Minor Changes
|
|
81
|
+
|
|
82
|
+
- 8a17872: Updted package from chanify and implemented custom rpc settings
|
|
83
|
+
|
|
84
|
+
## 2.0.1
|
|
85
|
+
|
|
86
|
+
### Patch Changes
|
|
87
|
+
|
|
88
|
+
- 25567cb: fix: add ledger error parser
|
|
89
|
+
fix: add jsonRPC error parser
|
|
90
|
+
fix: add error parser for debridge
|
|
91
|
+
fix: add error parser for thorchain
|
|
92
|
+
- 118f1a0: fix: map 1006NotFound error to pair not supported- - 1inch probably didn't find token in their list enabled/supported ones
|
|
93
|
+
- 839c9eb: test: bump to next pre release version
|
|
94
|
+
- 594615f: test: bump versions
|
|
95
|
+
- 196dd88: fix: move translations out of error-parser - translation strings should be in the clients that use them
|
|
96
|
+
- 7f192b5: fix: add error parser for uniswapV2
|
|
97
|
+
fix: split messages going to discord
|
|
98
|
+
- 4b3b100: test: bump pre release version
|
|
99
|
+
- a9ffd93: fix: add new liquality error, LedgerDeviceSmartContractTransactionDisabledError
|
|
100
|
+
fix: make chainify proxy work after transpilation. sendTransaction, an async function is made into a regular function and causes undesireable effects
|
|
101
|
+
- a9110e3: fix: map more errors to PairNotSupportedError
|
|
102
|
+
- 9e5ff10: fix: report error iff users wish to
|
|
103
|
+
- Updated dependencies [aa5fe04]
|
|
104
|
+
- Updated dependencies [839c9eb]
|
|
105
|
+
- Updated dependencies [594615f]
|
|
106
|
+
- Updated dependencies [4b3b100]
|
|
107
|
+
- @yaswap/cryptoassets@2.1.0
|
|
108
|
+
|
|
109
|
+
## 2.0.1-next.3
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- 118f1a0: fix: map 1006NotFound error to pair not supported- - 1inch probably didn't find token in their list enabled/supported ones
|
|
114
|
+
- 9e5ff10: fix: report error iff users wish to
|
|
115
|
+
|
|
116
|
+
## 2.0.1-next.2
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- 4b3b100: test: bump pre release version
|
|
121
|
+
- Updated dependencies [4b3b100]
|
|
122
|
+
- @yaswap/cryptoassets@2.1.0-next.2
|
|
123
|
+
|
|
124
|
+
## 2.0.1-next.1
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- 839c9eb: test: bump to next pre release version
|
|
129
|
+
- 196dd88: fix: move translations out of error-parser - translation strings should be in the clients that use them
|
|
130
|
+
- a9ffd93: fix: add new liquality error, LedgerDeviceSmartContractTransactionDisabledError
|
|
131
|
+
fix: make chainify proxy work after transpilation. sendTransaction, an async function is made into a regular function and causes undesireable effects
|
|
132
|
+
- a9110e3: fix: map more errors to PairNotSupportedError
|
|
133
|
+
- Updated dependencies [839c9eb]
|
|
134
|
+
- @yaswap/cryptoassets@2.1.0-next.1
|
|
135
|
+
|
|
136
|
+
## 2.0.1-next.0
|
|
137
|
+
|
|
138
|
+
### Patch Changes
|
|
139
|
+
|
|
140
|
+
- 594615f: test: bump versions
|
|
141
|
+
- Updated dependencies [aa5fe04]
|
|
142
|
+
- Updated dependencies [594615f]
|
|
143
|
+
- @yaswap/cryptoassets@2.1.0-next.0
|
|
144
|
+
|
|
145
|
+
## 2.0.0
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- 1673543: test: bump versions from master for 0.78.0 release
|
|
150
|
+
- Updated dependencies [1673543]
|
|
151
|
+
- @yaswap/cryptoassets@2.0.0
|
|
152
|
+
|
|
153
|
+
## 2.0.0-next.6
|
|
154
|
+
|
|
155
|
+
### Patch Changes
|
|
156
|
+
|
|
157
|
+
- 5bb19d0: bump version after fix
|
|
158
|
+
- Updated dependencies [5bb19d0]
|
|
159
|
+
- @yaswap/cryptoassets@2.0.0-next.6
|
|
160
|
+
|
|
161
|
+
## 2.0.0-next.5
|
|
162
|
+
|
|
163
|
+
### Major Changes
|
|
164
|
+
|
|
165
|
+
- bc9b6a3: test: bump all along with error parser
|
|
166
|
+
|
|
167
|
+
### Patch Changes
|
|
168
|
+
|
|
169
|
+
- Updated dependencies [bc9b6a3]
|
|
170
|
+
- @yaswap/cryptoassets@2.0.0-next.5
|
|
171
|
+
|
|
172
|
+
## 1.1.4-next.4
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- b1dbb31: test: bump pre release version
|
|
177
|
+
- Updated dependencies [b1dbb31]
|
|
178
|
+
- @yaswap/cryptoassets@1.16.3-next.4
|
|
179
|
+
|
|
180
|
+
## 1.1.4-next.3
|
|
181
|
+
|
|
182
|
+
### Patch Changes
|
|
183
|
+
|
|
184
|
+
- 07bd108: test: bump pre release
|
|
185
|
+
- Updated dependencies [07bd108]
|
|
186
|
+
- @yaswap/cryptoassets@1.16.3-next.3
|
|
187
|
+
|
|
188
|
+
## 1.1.4-next.2
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- 3c309e1: fix: covalent api key
|
|
193
|
+
- Updated dependencies [3c309e1]
|
|
194
|
+
- @yaswap/cryptoassets@1.16.3-next.2
|
|
195
|
+
- @yaswap/wallet-core@1.31.4-next.2
|
|
196
|
+
|
|
197
|
+
## 1.1.4-next.1
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- a156f8e: test: bump versions to next
|
|
202
|
+
- Updated dependencies [a156f8e]
|
|
203
|
+
- @yaswap/cryptoassets@1.16.3-next.1
|
|
204
|
+
- @yaswap/wallet-core@1.31.4-next.1
|
|
205
|
+
|
|
206
|
+
## 1.1.4-next.0
|
|
207
|
+
|
|
208
|
+
### Patch Changes
|
|
209
|
+
|
|
210
|
+
- test: bump versions
|
|
211
|
+
- Updated dependencies
|
|
212
|
+
- @yaswap/cryptoassets@1.16.3-next.0
|
|
213
|
+
- @yaswap/wallet-core@1.31.4-next.0
|
|
214
|
+
|
|
215
|
+
## 1.1.3
|
|
216
|
+
|
|
217
|
+
### Patch Changes
|
|
218
|
+
|
|
219
|
+
- Updated dependencies [2173cb9]
|
|
220
|
+
- @yaswap/wallet-core@1.31.3
|
|
221
|
+
|
|
222
|
+
## 1.1.2
|
|
223
|
+
|
|
224
|
+
### Patch Changes
|
|
225
|
+
|
|
226
|
+
- 2ecbc28: test: bump versions with toggle fix
|
|
227
|
+
- Updated dependencies [2ecbc28]
|
|
228
|
+
- @yaswap/cryptoassets@1.16.2
|
|
229
|
+
- @yaswap/wallet-core@1.31.2
|
|
230
|
+
|
|
231
|
+
## 1.1.1
|
|
232
|
+
|
|
233
|
+
### Patch Changes
|
|
234
|
+
|
|
235
|
+
- 0dd1f89: test: bump versions from master
|
|
236
|
+
- Updated dependencies [0dd1f89]
|
|
237
|
+
- @yaswap/cryptoassets@1.16.1
|
|
238
|
+
- @yaswap/wallet-core@1.31.1
|
|
239
|
+
|
|
240
|
+
## 1.1.0
|
|
241
|
+
|
|
242
|
+
### Patch Changes
|
|
243
|
+
|
|
244
|
+
- 17378a0: test: bump versions for 0.76.0 release
|
|
245
|
+
- Updated dependencies [17378a0]
|
|
246
|
+
- @yaswap/cryptoassets@1.16.0
|
|
247
|
+
- @yaswap/wallet-core@1.31.0
|
|
248
|
+
|
|
249
|
+
## 1.1.0-next.5
|
|
250
|
+
|
|
251
|
+
### Patch Changes
|
|
252
|
+
|
|
253
|
+
- 840dbd8: chore: bump versions after lifi integration
|
|
254
|
+
- Updated dependencies [840dbd8]
|
|
255
|
+
- @yaswap/cryptoassets@1.16.0-next.5
|
|
256
|
+
- @yaswap/wallet-core@1.31.0-next.5
|
|
257
|
+
|
|
258
|
+
## 1.1.0-next.4
|
|
259
|
+
|
|
260
|
+
### Minor Changes
|
|
261
|
+
|
|
262
|
+
- fa3595a: fix debridge and testnet issues
|
|
263
|
+
|
|
264
|
+
### Patch Changes
|
|
265
|
+
|
|
266
|
+
- Updated dependencies [fa3595a]
|
|
267
|
+
- @yaswap/cryptoassets@1.16.0-next.4
|
|
268
|
+
- @yaswap/wallet-core@1.31.0-next.4
|
|
269
|
+
|
|
270
|
+
## 1.1.0-next.3
|
|
271
|
+
|
|
272
|
+
### Minor Changes
|
|
273
|
+
|
|
274
|
+
- 7454432: lifi + debridge + goerli
|
|
275
|
+
|
|
276
|
+
### Patch Changes
|
|
277
|
+
|
|
278
|
+
- Updated dependencies [7454432]
|
|
279
|
+
- @yaswap/cryptoassets@1.16.0-next.3
|
|
280
|
+
- @yaswap/wallet-core@1.31.0-next.3
|
|
281
|
+
|
|
282
|
+
## 1.1.0-next.2
|
|
283
|
+
|
|
284
|
+
### Minor Changes
|
|
285
|
+
|
|
286
|
+
- 412e1d1: bump
|
|
287
|
+
- 412e1d1: bump2
|
|
288
|
+
|
|
289
|
+
### Patch Changes
|
|
290
|
+
|
|
291
|
+
- Updated dependencies [412e1d1]
|
|
292
|
+
- Updated dependencies [412e1d1]
|
|
293
|
+
- @yaswap/cryptoassets@1.16.0-next.2
|
|
294
|
+
- @yaswap/wallet-core@1.31.0-next.2
|
|
295
|
+
|
|
296
|
+
## 1.1.0-next.1
|
|
297
|
+
|
|
298
|
+
### Minor Changes
|
|
299
|
+
|
|
300
|
+
- b9db052: increment
|
|
301
|
+
|
|
302
|
+
### Patch Changes
|
|
303
|
+
|
|
304
|
+
- Updated dependencies [b9db052]
|
|
305
|
+
- @yaswap/cryptoassets@1.16.0-next.1
|
|
306
|
+
- @yaswap/wallet-core@1.31.0-next.1
|
|
307
|
+
|
|
308
|
+
## 1.1.0-next.0
|
|
309
|
+
|
|
310
|
+
### Minor Changes
|
|
311
|
+
|
|
312
|
+
- 3d90aee: Lifi + debridge + goerli testnet
|
|
313
|
+
- e45d2cb: fix: debridge rpc url
|
|
314
|
+
- 61c228e: feat: eth testnet to goerli
|
|
315
|
+
|
|
316
|
+
### Patch Changes
|
|
317
|
+
|
|
318
|
+
- Updated dependencies [3d90aee]
|
|
319
|
+
- Updated dependencies [e45d2cb]
|
|
320
|
+
- Updated dependencies [61c228e]
|
|
321
|
+
- @yaswap/cryptoassets@1.16.0-next.0
|
|
322
|
+
- @yaswap/wallet-core@1.31.0-next.0
|
|
323
|
+
|
|
324
|
+
<<<<<<< HEAD
|
|
325
|
+
|
|
326
|
+
## 1.1.0-next.2
|
|
327
|
+
|
|
328
|
+
### Minor Changes
|
|
329
|
+
|
|
330
|
+
- e80e6eb: feat: debridge swap provider
|
|
331
|
+
- 5e3607c: feat: debridge swap provider
|
|
332
|
+
|
|
333
|
+
### Patch Changes
|
|
334
|
+
|
|
335
|
+
- Updated dependencies [e80e6eb]
|
|
336
|
+
- Updated dependencies [5e3607c]
|
|
337
|
+
- @yaswap/cryptoassets@1.16.0-next.2
|
|
338
|
+
- @yaswap/wallet-core@1.31.0-next.2
|
|
339
|
+
|
|
340
|
+
## 1.1.0-next.1
|
|
341
|
+
|
|
342
|
+
### Minor Changes
|
|
343
|
+
|
|
344
|
+
- 31a975e: bump
|
|
345
|
+
- eadd70c: fix: getQuotes has slow quotes propery
|
|
346
|
+
|
|
347
|
+
### Patch Changes
|
|
348
|
+
|
|
349
|
+
- Updated dependencies [31a975e]
|
|
350
|
+
- Updated dependencies [eadd70c]
|
|
351
|
+
- @yaswap/cryptoassets@1.16.0-next.1
|
|
352
|
+
- @yaswap/wallet-core@1.31.0-next.1
|
|
353
|
+
|
|
354
|
+
## 1.1.0-next.0
|
|
355
|
+
|
|
356
|
+
### Minor Changes
|
|
357
|
+
|
|
358
|
+
- 7fa751e: feat: lifi swap provider
|
|
359
|
+
refactor: get quotes returns fast quotes first. getSlowQuotes action to retrieve restr
|
|
360
|
+
- cb2c60a: feat: lifi swap provider
|
|
361
|
+
refactor: get quotes returns fast quotes first. `getSlowQuotes` action to retrieve restr
|
|
362
|
+
|
|
363
|
+
### Patch Changes
|
|
364
|
+
|
|
365
|
+
- Updated dependencies [7fa751e]
|
|
366
|
+
- Updated dependencies [cb2c60a]
|
|
367
|
+
- @yaswap/wallet-core@1.31.0-next.0
|
|
368
|
+
- # @yaswap/cryptoassets@1.16.0-next.0
|
|
369
|
+
|
|
370
|
+
## 1.0.12
|
|
371
|
+
|
|
372
|
+
### Patch Changes
|
|
373
|
+
|
|
374
|
+
- d764511: - fix fetching assets
|
|
375
|
+
|
|
376
|
+
## 1.0.11
|
|
377
|
+
|
|
378
|
+
### Patch Changes
|
|
379
|
+
|
|
380
|
+
- efdc92d: fix: pass solana rpc as environmnet variable
|
|
381
|
+
|
|
382
|
+
## 1.0.10
|
|
383
|
+
|
|
384
|
+
### Patch Changes
|
|
385
|
+
|
|
386
|
+
- 1ae3e84: fix: bump versions from master
|
|
387
|
+
> > > > > > > master
|
|
388
|
+
|
|
389
|
+
## 1.0.9
|
|
390
|
+
|
|
391
|
+
### Patch Changes
|
|
392
|
+
|
|
393
|
+
- bd46603: test: bump all versions for hot fix solana endpoints change
|
|
394
|
+
|
|
395
|
+
## 1.0.8
|
|
396
|
+
|
|
397
|
+
### Patch Changes
|
|
398
|
+
|
|
399
|
+
- f6394a0: fix: revert some changes and bump versions
|
|
400
|
+
|
|
401
|
+
## 1.0.7
|
|
402
|
+
|
|
403
|
+
### Patch Changes
|
|
404
|
+
|
|
405
|
+
- 3c0113f: test: bump patch versions
|
|
406
|
+
- e466d4f: test: bump versions
|
|
407
|
+
|
|
408
|
+
## 1.0.6
|
|
409
|
+
|
|
410
|
+
### Patch Changes
|
|
411
|
+
|
|
412
|
+
- 955a8c3: feat: bump to patch versions for 0.73.0
|
|
413
|
+
|
|
414
|
+
## 1.0.5
|
|
415
|
+
|
|
416
|
+
### Patch Changes
|
|
417
|
+
|
|
418
|
+
- 8f4b740: test: bump version from master test
|
|
419
|
+
|
|
420
|
+
## 1.0.4
|
|
421
|
+
|
|
422
|
+
### Patch Changes
|
|
423
|
+
|
|
424
|
+
- c632674: test: bump all packages after remove logic from ci
|
|
425
|
+
|
|
426
|
+
## 1.0.3
|
|
427
|
+
|
|
428
|
+
### Patch Changes
|
|
429
|
+
|
|
430
|
+
- 1784096: feat: bump version from master after yarn lock file
|
|
431
|
+
|
|
432
|
+
## 1.0.2
|
|
433
|
+
|
|
434
|
+
### Patch Changes
|
|
435
|
+
|
|
436
|
+
- fe656f0: test: testing bump version without running changeset version command local
|
|
437
|
+
- 66038e7: test: bump another next version from develop branch
|
|
438
|
+
- 66038e7: test: test another pre release bump
|
|
439
|
+
- f552f0e: feat: bump patch version from master branch for rc0.73.0
|
|
440
|
+
|
|
441
|
+
## 1.0.2-next.3
|
|
442
|
+
|
|
443
|
+
### Patch Changes
|
|
444
|
+
|
|
445
|
+
- fe656f0: test: testing bump version without running changeset version command local
|
|
446
|
+
|
|
447
|
+
## 1.0.2-next.2
|
|
448
|
+
|
|
449
|
+
### Patch Changes
|
|
450
|
+
|
|
451
|
+
- test: test another pre release bump
|
|
452
|
+
|
|
453
|
+
## 1.0.2-next.1
|
|
454
|
+
|
|
455
|
+
### Patch Changes
|
|
456
|
+
|
|
457
|
+
- test: bump another next version from develop branch
|
|
458
|
+
|
|
459
|
+
## 1.0.2-next.0
|
|
460
|
+
|
|
461
|
+
### Patch Changes
|
|
462
|
+
|
|
463
|
+
- 179f0b4: test: prerelease version bump
|
|
464
|
+
|
|
465
|
+
## 1.0.1
|
|
466
|
+
|
|
467
|
+
### Patch Changes
|
|
468
|
+
|
|
469
|
+
- 5e73c63: feat: bump all versions from master
|
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Error Parser
|
|
2
|
+
|
|
3
|
+
## General Information
|
|
4
|
+
|
|
5
|
+
Error Parser is an Error formatting and reporting Library for Liquality. It's an effort to understand and produce User-friendly messages for the different errors that arise either internally or as a result of calls made to external endpoints/packages. Here are some important points:
|
|
6
|
+
|
|
7
|
+
1. **Parsers**: The Error parser contains parsers, one for each external endpoint or package that could throw. Each Parser takes in an error (let's call it raw error) and returns a Liquality Error.
|
|
8
|
+
|
|
9
|
+
2. **Liquality Error:** A Liquality is simply an extension of JS Error. It has a message for the user and for developers/QA so everyone is carried along (See [here](src/LiqualityErrors/LiqualityError.ts) for the full structure of a Liquality Error). There are really three(3) broad categories of Liquality Errors: Internal errors, third party errors and input errors.
|
|
10
|
+
|
|
11
|
+
- _Internal errors_ are exceptions traceable to mistakes in our code.
|
|
12
|
+
- _Third party errors_ are exceptions from external sources.
|
|
13
|
+
- _Input errors_ are errors arising from user provided values. This category makes for the bulk of Liquality error types.
|
|
14
|
+
(See [Here](src/LiqualityErrors/index.ts) for a full list of available liquality errors).
|
|
15
|
+
|
|
16
|
+
3. **User Message:** The actual user message is not contained in the Liquality Error. Rather there are keys and data which needs to be passed through a translation library to get the actual message in the locale of the user. There are actually two keys for the user message, namely, causeKey and suggestionKey. While causeKey is used by the translator to get the cause of the error, the suggestionKey is used to get a list of <SUGGESTION_DELIMETER> seperated list of things the user can try. The <SUGGESTION_DELIMETER> is chosen such that no language has a meaningful use for it. This is useful should you want to split the suggestions string into an array of suggestions.
|
|
17
|
+
|
|
18
|
+
4. **Custom Internal Errors:** The Error Parser package contains a list of [reusable Custom Errors](src/LiqualityErrors/customErrors.ts) that can be used anywhere there is a need to throw an Internal Error.
|
|
19
|
+
|
|
20
|
+
5. **Error Reporting:**
|
|
21
|
+
- The error reporting is done seemlessly without the developer's intervention. The error reporting function is automatically invoked [after parsing an external](https://github.com/liquality/wallet-core/blob/911aa835d15782c33811a7b3b03d7766d4c52d93/packages/error-parser/src/parsers/ErrorParser.ts#L32) error and [after creating a custom error](https://github.com/liquality/wallet-core/blob/8f8b6cb5dae62a791c2608a6a21f85e3132c63ff/packages/error-parser/src/utils/index.ts#L17).
|
|
22
|
+
- The Error parser package relies on two env variables
|
|
23
|
+
- `VUE_APP_REPORT_TARGETS` listing a comma-separated list of destinations where error reports should be sent(`Console` and `Discord` are currently supported) and
|
|
24
|
+
- `VUE_APP_DISCORD_WEBHOOK` to hold the discord webhook (if necessary)
|
|
25
|
+
- Error Reporting is non blocking and fails silently (see [example](https://github.com/liquality/wallet-core/blob/d1f5e332c97d2b4965f8fc4fd450eed62b78e0cf/packages/error-parser/src/reporters/discord.ts#L10))
|
|
26
|
+
|
|
27
|
+
## How to Install
|
|
28
|
+
|
|
29
|
+
`npm install @yaswap/error-parser`
|
|
30
|
+
|
|
31
|
+
`yarn add @yaswap/error-parser`
|
|
32
|
+
|
|
33
|
+
## How to Create a New Parser
|
|
34
|
+
|
|
35
|
+
1. _Extend the [base Error Parser](src/parsers/ErrorParser.ts)_.
|
|
36
|
+
The primary function in the Error Parser is the \_parseError function. This function should have a way to map each raw error to the appropriate
|
|
37
|
+
Liquality Error.
|
|
38
|
+
|
|
39
|
+
See [OneInchApproveAPI](src/parsers/OneInchAPI/ApproveErrorParser.ts) Error Parser as an example.
|
|
40
|
+
|
|
41
|
+
1. _Write a test for the parser_.
|
|
42
|
+
The test should verify that the source error should map to the appropriate
|
|
43
|
+
Liquality Error. See [OneInchApproveAPI Error Parser test](src/test/oneInch/approveAPI.test.ts) as an example.
|
|
44
|
+
|
|
45
|
+
## How to use
|
|
46
|
+
|
|
47
|
+
The following Code snippets present four(4) different ways to use the error parser package
|
|
48
|
+
|
|
49
|
+
- ### Wrapping a call
|
|
50
|
+
|
|
51
|
+
You can use `wrap` or `wrapAsync` to wrap sync and async calls respectively. When a call is wrapped any error from that call is rethrown as a Liquality error and also reported.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
|
|
55
|
+
import { getParser, OneInchApproveErrorParser } from '@yaswap/error-parser’;
|
|
56
|
+
|
|
57
|
+
// Instead of the snippet below
|
|
58
|
+
// const callData = await this._httpClient.nodeGet(`/${chainId}/approve/transaction`, {
|
|
59
|
+
// tokenAddress: cryptoassets[quote.from].contractAddress,
|
|
60
|
+
// amount: inputAmount.toString(),
|
|
61
|
+
// });
|
|
62
|
+
|
|
63
|
+
// We have this ...
|
|
64
|
+
const parser = getParser(OneInchApproveErrorParser);
|
|
65
|
+
const callData = await parser.wrapAsync( async () => {
|
|
66
|
+
await this._httpClient.nodeGet(`/${chainId}/approve/transaction`, {
|
|
67
|
+
tokenAddress: cryptoassets[quote.from].contractAddress,
|
|
68
|
+
amount: inputAmount.toString(),
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
// Add Optional object literal here... containing any data that may be used to make error message more helpful
|
|
72
|
+
);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- ### Parsing an error
|
|
76
|
+
|
|
77
|
+
You can parse an error returned from a call instead of wrapping the call.
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import { ChainifyErrorParser, CUSTOM_ERRORS, getErrorParser } from '@yaswap/error-parser';
|
|
81
|
+
|
|
82
|
+
const parser = getErrorParser(ChainifyErrorParser);
|
|
83
|
+
try {
|
|
84
|
+
const result = await target();
|
|
85
|
+
return result;
|
|
86
|
+
} catch (e) {
|
|
87
|
+
const liqualityError = parser.parseError(e, null);
|
|
88
|
+
throw liqualityError;
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- ### Throwing a Custom Internal Error
|
|
93
|
+
|
|
94
|
+
You can throw a custom internal error by using one of the standard custom errors to express what went wrong. Rather than doing new InternalError(...) we use createInternalError helper so we can also report the error after creation before returning.
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
import { CUSTOM_ERRORS, createInternalError } from '@yaswap/error-parser';
|
|
98
|
+
|
|
99
|
+
throw createInternalError(CUSTOM_ERRORS.NotFound.Account(accountId));
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- ### How to get translations
|
|
103
|
+
|
|
104
|
+
The error translation files for Mobile is separated from that of Wallet Extension sake of possibility of copy differences. The translations follow the format of [i18n-js translation library](https://www.npmjs.com/package/i18n-js). Each error has a plain translation and a placeholder translation. Placeholder translation interpolates data in the message to make it more information while plain translation is a fallback translation in the event that no data is provided (See [here](src/LiqualityErrors/translations) to see the error translation copy) Here is how to get the translations from Error Parser:
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
import { TRANSLATIONS } from '@yaswap/error-parser';
|
|
108
|
+
|
|
109
|
+
errorTranslationsForWalletExtension = TRANSLATIONS.walletExtension; // {cb, en, es, ph, pt, zh}
|
|
110
|
+
errorTranslationsForMobile = TRANSLATIONS.walletExtension; // {cb, en, es, ph, pt, zh}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## How to run tests
|
|
114
|
+
|
|
115
|
+
```angular2html
|
|
116
|
+
yarn test
|
|
117
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yaswap/error-parser",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Error Parsing Library for liquality",
|
|
5
|
+
"repository": "git@github.com:liquality/wallet-core.git",
|
|
6
|
+
"author": "koderholic <meetenebelioluchi@gmail.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"main": "./dist/src/index.js",
|
|
9
|
+
"types": "./dist/src/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/**"
|
|
12
|
+
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@yaswap/client": "2.0.0",
|
|
15
|
+
"@yaswap/cryptoassets": "workspace:*",
|
|
16
|
+
"@yaswap/errors": "2.0.0",
|
|
17
|
+
"randombytes": "^2.1.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/randombytes": "^2.0.0",
|
|
21
|
+
"randexp": "^0.5.3"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"clean": "rm -rf node_modules .turbo dist",
|
|
26
|
+
"watch": "tsc -w",
|
|
27
|
+
"test": "npx jest --coverage",
|
|
28
|
+
"test:watch": "npx jest --watch",
|
|
29
|
+
"test:clearCache": "npx jest --clearCache"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LiqualityError } from './LiqualityError';
|
|
2
|
+
export declare class DappNotConnectedError extends LiqualityError<DappNotConnectedErrorContext> {
|
|
3
|
+
constructor(data?: DappNotConnectedErrorContext);
|
|
4
|
+
setTranslationKey(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare type DappNotConnectedErrorContext = {
|
|
7
|
+
dapp: string;
|
|
8
|
+
chain: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DappNotConnectedError = void 0;
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
const LiqualityError_1 = require("./LiqualityError");
|
|
6
|
+
class DappNotConnectedError extends LiqualityError_1.LiqualityError {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super(config_1.ERROR_NAMES.DappNotConnectedError, data);
|
|
9
|
+
}
|
|
10
|
+
setTranslationKey() {
|
|
11
|
+
this.translationKey = '';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.DappNotConnectedError = DappNotConnectedError;
|
|
15
|
+
//# sourceMappingURL=DappNotConnectedError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DappNotConnectedError.js","sourceRoot":"","sources":["../../../src/LiqualityErrors/DappNotConnectedError.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,qDAAkD;AAElD,MAAa,qBAAsB,SAAQ,+BAA4C;IACrF,YAAY,IAAmC;QAC7C,KAAK,CAAC,oBAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,iBAAiB;QACf,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;CACF;AAPD,sDAOC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DuplicateTokenSymbolError = void 0;
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
const LiqualityError_1 = require("./LiqualityError");
|
|
6
|
+
class DuplicateTokenSymbolError extends LiqualityError_1.LiqualityError {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(config_1.ERROR_NAMES.DuplicateTokenSymbolError);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.DuplicateTokenSymbolError = DuplicateTokenSymbolError;
|
|
12
|
+
//# sourceMappingURL=DuplicateTokenSymbolError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DuplicateTokenSymbolError.js","sourceRoot":"","sources":["../../../src/LiqualityErrors/DuplicateTokenSymbolError.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,qDAAkD;AAClD,MAAa,yBAA0B,SAAQ,+BAAc;IAC3D;QACE,KAAK,CAAC,oBAAW,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;CACF;AAJD,8DAIC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LiqualityError } from './LiqualityError';
|
|
2
|
+
export declare class HighInputAmountError extends LiqualityError<HighInputAmountErrorContext> {
|
|
3
|
+
constructor(data?: HighInputAmountErrorContext);
|
|
4
|
+
setTranslationKey(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare type HighInputAmountErrorContext = {
|
|
7
|
+
expectedMaximum: string;
|
|
8
|
+
assetCode: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HighInputAmountError = void 0;
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
const LiqualityError_1 = require("./LiqualityError");
|
|
6
|
+
class HighInputAmountError extends LiqualityError_1.LiqualityError {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super(config_1.ERROR_NAMES.HighInputAmountError, data);
|
|
9
|
+
}
|
|
10
|
+
setTranslationKey() {
|
|
11
|
+
this.translationKey = '';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.HighInputAmountError = HighInputAmountError;
|
|
15
|
+
//# sourceMappingURL=HighInputAmountError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HighInputAmountError.js","sourceRoot":"","sources":["../../../src/LiqualityErrors/HighInputAmountError.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,qDAAkD;AAClD,MAAa,oBAAqB,SAAQ,+BAA2C;IACnF,YAAY,IAAkC;QAC5C,KAAK,CAAC,oBAAW,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;CACF;AARD,oDAQC"}
|