wallaby-cash 1.7.22 → 1.7.24
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 +8 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/transactions/index.d.ts +1 -1
- package/dist/types/transactions.d.ts +3 -1
- package/dist/types/wallet.d.ts +10 -0
- package/package.json +2 -1
package/dist/index.cjs.js
CHANGED
|
@@ -7226,13 +7226,16 @@ var Transactions = /** @class */ (function (_super) {
|
|
|
7226
7226
|
Transactions.prototype.createAllowance = function (_a) {
|
|
7227
7227
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
7228
7228
|
var signatureMessage, transportSeedPhrase, message, signature, clientAuthPubKey, response, error_5;
|
|
7229
|
-
var password = _b.password, ownerAddress = _b.ownerAddress, spenderAddress = _b.spenderAddress, amount = _b.amount, assetId = _b.assetId, suiObjectId = _b.suiObjectId, contractAddress = _b.contractAddress, reference = _b.reference, memo = _b.memo;
|
|
7229
|
+
var password = _b.password, ownerAddress = _b.ownerAddress, spenderAddress = _b.spenderAddress, amount = _b.amount, assetId = _b.assetId, suiObjectId = _b.suiObjectId, contractAddress = _b.contractAddress, chainName = _b.chainName, assetSymbol = _b.assetSymbol, reference = _b.reference, memo = _b.memo;
|
|
7230
7230
|
return __generator(this, function (_c) {
|
|
7231
7231
|
switch (_c.label) {
|
|
7232
7232
|
case 0:
|
|
7233
7233
|
_c.trys.push([0, 4, , 5]);
|
|
7234
|
-
if (!suiObjectId
|
|
7235
|
-
throw new Error(
|
|
7234
|
+
if (!suiObjectId && !contractAddress && !assetId && !assetSymbol && !chainName) {
|
|
7235
|
+
throw new Error("AssetId, asset symbol, chain name or contract address must be provided.");
|
|
7236
|
+
}
|
|
7237
|
+
if ((assetSymbol && !chainName) || (!assetSymbol && chainName)) {
|
|
7238
|
+
throw new Error("Asset symbol and chain name must be provided when asset is not in user wallet.");
|
|
7236
7239
|
}
|
|
7237
7240
|
return [4 /*yield*/, this.auth.signatureMessage({ password: password })];
|
|
7238
7241
|
case 1:
|
|
@@ -7250,6 +7253,8 @@ var Transactions = /** @class */ (function (_super) {
|
|
|
7250
7253
|
encryptedSeed: transportSeedPhrase,
|
|
7251
7254
|
ownerAddress: ownerAddress,
|
|
7252
7255
|
spenderAddress: spenderAddress,
|
|
7256
|
+
chainName: chainName,
|
|
7257
|
+
assetSymbol: assetSymbol,
|
|
7253
7258
|
amount: amount,
|
|
7254
7259
|
assetId: assetId,
|
|
7255
7260
|
contractAddress: contractAddress !== null && contractAddress !== void 0 ? contractAddress : suiObjectId,
|