wallaby-cash 2.2.1-alpha.0 → 2.2.1-alpha.2
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.cjs.js +9 -31
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +9 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -31
- package/dist/index.js.map +1 -1
- package/dist/lib/transactions/index.d.ts +7 -3
- package/dist/lib/wallet/wallet-data.service.d.ts +5 -5
- package/dist/package.json +1 -2
- package/dist/types/transactions.d.ts +9 -3
- package/package.json +1 -2
package/dist/index.cjs.js
CHANGED
|
@@ -10294,11 +10294,8 @@ class WalletDataService extends Base {
|
|
|
10294
10294
|
errorCode: exports.ErrorResponseCodes.sdk_missing_parameter,
|
|
10295
10295
|
});
|
|
10296
10296
|
}
|
|
10297
|
-
const response = await this.
|
|
10298
|
-
|
|
10299
|
-
address: address,
|
|
10300
|
-
chainName: chainName,
|
|
10301
|
-
tokenStandard: tokenStandard,
|
|
10297
|
+
const response = await this.request(WalletRoutes.getTokenBalance, {
|
|
10298
|
+
payload: { address, symbol, chainName, tokenStandard },
|
|
10302
10299
|
});
|
|
10303
10300
|
return response;
|
|
10304
10301
|
}
|
|
@@ -10341,7 +10338,7 @@ class WalletDataService extends Base {
|
|
|
10341
10338
|
* @public
|
|
10342
10339
|
* Fetches the balances for all tokens in a specific wallet.
|
|
10343
10340
|
* @param { string } walletId Wallet address
|
|
10344
|
-
* @returns {
|
|
10341
|
+
* @returns { TokenBalanceResponse } Returns an object containing the requested tokens balances.
|
|
10345
10342
|
*/
|
|
10346
10343
|
async getWalletBalances({ walletId }) {
|
|
10347
10344
|
try {
|
|
@@ -11186,33 +11183,14 @@ class Transactions extends Base {
|
|
|
11186
11183
|
const { deviceAuthPublicKey, signatureMessage, readyForTransportSeedPhrase, sharesEncryptedWithWallabyPubKey, hasShares } = await this.prepareTransactionAuth(authenticationOptions, walletId);
|
|
11187
11184
|
let transferResponse;
|
|
11188
11185
|
if (readyForTransportSeedPhrase) {
|
|
11189
|
-
transferResponse = await this.
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
originAddress,
|
|
11195
|
-
recipientAddress,
|
|
11196
|
-
assetId,
|
|
11197
|
-
amount: Number(amount),
|
|
11198
|
-
reference: reference || uuid.v4(),
|
|
11199
|
-
memo: memo || '',
|
|
11186
|
+
transferResponse = await this.request(TransactionsRoutes.transfer, {
|
|
11187
|
+
payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedSeed: readyForTransportSeedPhrase, originAddress,
|
|
11188
|
+
recipientAddress,
|
|
11189
|
+
assetId,
|
|
11190
|
+
amount, reference: reference || uuid.v4(), memo }),
|
|
11200
11191
|
});
|
|
11201
11192
|
}
|
|
11202
11193
|
else if (hasShares) {
|
|
11203
|
-
// transferResponse = await this.api.transactions.sendV2Transaction({
|
|
11204
|
-
// message: signatureMessage.message,
|
|
11205
|
-
// signature: signatureMessage.signature,
|
|
11206
|
-
// clientAuthPubKey: deviceAuthPublicKey,
|
|
11207
|
-
// encryptedSeed: {} as any, // Empty object since we're using shares
|
|
11208
|
-
// encryptedShares: sharesEncryptedWithWallabyPubKey as any,
|
|
11209
|
-
// originAddress,
|
|
11210
|
-
// recipientAddress,
|
|
11211
|
-
// assetId,
|
|
11212
|
-
// amount: Number(amount),
|
|
11213
|
-
// reference: reference || uuidv4(),
|
|
11214
|
-
// memo: memo || '',
|
|
11215
|
-
// });
|
|
11216
11194
|
transferResponse = await this.request(TransactionsRoutes.transferWithShares, {
|
|
11217
11195
|
payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedShares: sharesEncryptedWithWallabyPubKey, originAddress,
|
|
11218
11196
|
recipientAddress,
|
|
@@ -11258,7 +11236,7 @@ class Transactions extends Base {
|
|
|
11258
11236
|
throw new WallabyError({
|
|
11259
11237
|
message: `Asset symbol and chain name must be provided when asset is not in user wallet.`,
|
|
11260
11238
|
statusCode: 400,
|
|
11261
|
-
errorCode: exports.ErrorResponseCodes.
|
|
11239
|
+
errorCode: exports.ErrorResponseCodes.sdk_missing_parameter,
|
|
11262
11240
|
});
|
|
11263
11241
|
}
|
|
11264
11242
|
// Only attempt migration if we have password auth and V2 storage might be incomplete
|