@primuslabs/fund-js-sdk 0.1.32 → 0.1.33
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/dist/index.js +24 -0
- package/dist/index.mjs +24 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -148,8 +148,31 @@ var SUPPORTEDCHAINIDSMAP = {
|
|
|
148
148
|
},
|
|
149
149
|
contractAddress: "0xa2e0700a269Be3158c81E4739518b324d4398588",
|
|
150
150
|
redPacketContractAddress: "0x50bd377EB8D4236Bb587AB3FB1eeafd888AEeC58"
|
|
151
|
+
},
|
|
152
|
+
133: {
|
|
153
|
+
chainId: 133,
|
|
154
|
+
chainName: "HashKey Chain Testnet",
|
|
155
|
+
nativeCurrency: {
|
|
156
|
+
decimals: 18,
|
|
157
|
+
name: "HSK",
|
|
158
|
+
symbol: "HSK"
|
|
159
|
+
},
|
|
160
|
+
contractAddress: "0xd62A24eF37a62d613f53595B9700DFfdE372701D",
|
|
161
|
+
redPacketContractAddress: "0x018A793D8984d8ADcA5a7689273fFacBb131972E"
|
|
162
|
+
},
|
|
163
|
+
177: {
|
|
164
|
+
chainId: 177,
|
|
165
|
+
chainName: "HashKey Chain",
|
|
166
|
+
nativeCurrency: {
|
|
167
|
+
decimals: 18,
|
|
168
|
+
name: "HSK",
|
|
169
|
+
symbol: "HSK"
|
|
170
|
+
},
|
|
171
|
+
contractAddress: "0xa2e0700a269Be3158c81E4739518b324d4398588",
|
|
172
|
+
redPacketContractAddress: "0x50bd377EB8D4236Bb587AB3FB1eeafd888AEeC58"
|
|
151
173
|
}
|
|
152
174
|
};
|
|
175
|
+
console.log("version:163");
|
|
153
176
|
var NATIVETOKENS = Object.values(SUPPORTEDCHAINIDSMAP).reduce((prev, curr) => {
|
|
154
177
|
return {
|
|
155
178
|
...prev,
|
|
@@ -213,6 +236,7 @@ var formatErrFn = (error) => {
|
|
|
213
236
|
const isNoPendingWithdrawals = hasErrorFlagFn(curErrorStrArr, ["no pending withdrawals"]);
|
|
214
237
|
if (isNoPendingWithdrawals) {
|
|
215
238
|
formatError = "no pending withdrawals";
|
|
239
|
+
return formatError;
|
|
216
240
|
}
|
|
217
241
|
const insufficientBalanceErrStrArr = ["insufficient", "The caller does not have enough funds for value transfer.", "insufficient lamports", "Attempt to debit an account but found no record of a prior credit"];
|
|
218
242
|
const isInsufficientBalance = hasErrorFlagFn(curErrorStrArr, insufficientBalanceErrStrArr);
|
package/dist/index.mjs
CHANGED
|
@@ -114,8 +114,31 @@ var SUPPORTEDCHAINIDSMAP = {
|
|
|
114
114
|
},
|
|
115
115
|
contractAddress: "0xa2e0700a269Be3158c81E4739518b324d4398588",
|
|
116
116
|
redPacketContractAddress: "0x50bd377EB8D4236Bb587AB3FB1eeafd888AEeC58"
|
|
117
|
+
},
|
|
118
|
+
133: {
|
|
119
|
+
chainId: 133,
|
|
120
|
+
chainName: "HashKey Chain Testnet",
|
|
121
|
+
nativeCurrency: {
|
|
122
|
+
decimals: 18,
|
|
123
|
+
name: "HSK",
|
|
124
|
+
symbol: "HSK"
|
|
125
|
+
},
|
|
126
|
+
contractAddress: "0xd62A24eF37a62d613f53595B9700DFfdE372701D",
|
|
127
|
+
redPacketContractAddress: "0x018A793D8984d8ADcA5a7689273fFacBb131972E"
|
|
128
|
+
},
|
|
129
|
+
177: {
|
|
130
|
+
chainId: 177,
|
|
131
|
+
chainName: "HashKey Chain",
|
|
132
|
+
nativeCurrency: {
|
|
133
|
+
decimals: 18,
|
|
134
|
+
name: "HSK",
|
|
135
|
+
symbol: "HSK"
|
|
136
|
+
},
|
|
137
|
+
contractAddress: "0xa2e0700a269Be3158c81E4739518b324d4398588",
|
|
138
|
+
redPacketContractAddress: "0x50bd377EB8D4236Bb587AB3FB1eeafd888AEeC58"
|
|
117
139
|
}
|
|
118
140
|
};
|
|
141
|
+
console.log("version:163");
|
|
119
142
|
var NATIVETOKENS = Object.values(SUPPORTEDCHAINIDSMAP).reduce((prev, curr) => {
|
|
120
143
|
return {
|
|
121
144
|
...prev,
|
|
@@ -179,6 +202,7 @@ var formatErrFn = (error) => {
|
|
|
179
202
|
const isNoPendingWithdrawals = hasErrorFlagFn(curErrorStrArr, ["no pending withdrawals"]);
|
|
180
203
|
if (isNoPendingWithdrawals) {
|
|
181
204
|
formatError = "no pending withdrawals";
|
|
205
|
+
return formatError;
|
|
182
206
|
}
|
|
183
207
|
const insufficientBalanceErrStrArr = ["insufficient", "The caller does not have enough funds for value transfer.", "insufficient lamports", "Attempt to debit an account but found no record of a prior credit"];
|
|
184
208
|
const isInsufficientBalance = hasErrorFlagFn(curErrorStrArr, insufficientBalanceErrStrArr);
|