From 55c86a66217b8d85dffab1ab1801c5c2bae98c2c Mon Sep 17 00:00:00 2001 From: Dharmveer Bharti Date: Mon, 18 Nov 2024 00:33:25 +0530 Subject: [PATCH 1/2] Account index and key index fix in MeshWallet - set index numbers earlier in constructor - send index numbers in signData --- packages/mesh-wallet/src/mesh/index.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/mesh-wallet/src/mesh/index.ts b/packages/mesh-wallet/src/mesh/index.ts index a3d0b8ad..82ad1ef9 100644 --- a/packages/mesh-wallet/src/mesh/index.ts +++ b/packages/mesh-wallet/src/mesh/index.ts @@ -106,6 +106,11 @@ export class MeshWallet implements IInitiator, ISigner, ISubmitter { constructor(options: CreateMeshWalletOptions) { this._networkId = options.networkId; + if (options.fetcher) this._fetcher = options.fetcher; + if (options.submitter) this._submitter = options.submitter; + if (options.accountIndex) this._accountIndex = options.accountIndex; + if (options.keyIndex) this._keyIndex = options.keyIndex; + switch (options.key.type) { case "root": this._wallet = new EmbeddedWallet({ @@ -143,11 +148,6 @@ export class MeshWallet implements IInitiator, ISigner, ISubmitter { this.buildAddressFromBech32Address(options.key.address); break; } - - if (options.fetcher) this._fetcher = options.fetcher; - if (options.submitter) this._submitter = options.submitter; - if (options.accountIndex) this._accountIndex = options.accountIndex; - if (options.keyIndex) this._keyIndex = options.keyIndex; } /** @@ -324,7 +324,12 @@ export class MeshWallet implements IInitiator, ISigner, ISubmitter { if (address === undefined) { address = this.getChangeAddress()!; } - return this._wallet.signData(address, payload); + return this._wallet.signData( + address, + payload, + this._accountIndex, + this._keyIndex, + ); } /** From d65a35171acbc25f735507297c5d54ad829e44c9 Mon Sep 17 00:00:00 2001 From: "Hong Jing (Jingles)" Date: Mon, 18 Nov 2024 08:53:56 +0800 Subject: [PATCH 2/2] bump version --- packages/mesh-common/package.json | 2 +- packages/mesh-contract/package.json | 8 ++++---- packages/mesh-core-csl/package.json | 6 +++--- packages/mesh-core-cst/package.json | 4 ++-- packages/mesh-core/package.json | 16 ++++++++-------- packages/mesh-provider/package.json | 6 +++--- packages/mesh-react/package.json | 8 ++++---- packages/mesh-transaction/package.json | 8 ++++---- packages/mesh-wallet/package.json | 10 +++++----- scripts/mesh-cli/package.json | 2 +- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/mesh-common/package.json b/packages/mesh-common/package.json index c5d8cc53..42c8d6aa 100644 --- a/packages/mesh-common/package.json +++ b/packages/mesh-common/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/common", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "browser": "./dist/index.js", diff --git a/packages/mesh-contract/package.json b/packages/mesh-contract/package.json index 1c97bf6b..9d0def1c 100644 --- a/packages/mesh-contract/package.json +++ b/packages/mesh-contract/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/contract", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -34,9 +34,9 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.18", - "@meshsdk/core": "1.7.18", - "@meshsdk/core-csl": "1.7.18" + "@meshsdk/common": "1.7.19", + "@meshsdk/core": "1.7.19", + "@meshsdk/core-csl": "1.7.19" }, "prettier": "@meshsdk/configs/prettier", "publishConfig": { diff --git a/packages/mesh-core-csl/package.json b/packages/mesh-core-csl/package.json index 45b0e013..45618fb3 100644 --- a/packages/mesh-core-csl/package.json +++ b/packages/mesh-core-csl/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/core-csl", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "module": "./dist/index.js", @@ -31,7 +31,7 @@ }, "devDependencies": { "@meshsdk/configs": "*", - "@meshsdk/provider": "1.7.18", + "@meshsdk/provider": "1.7.19", "@types/json-bigint": "^1.0.4", "eslint": "^8.57.0", "ts-jest": "^29.1.4", @@ -39,7 +39,7 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.18", + "@meshsdk/common": "1.7.19", "@sidan-lab/sidan-csl-rs-browser": "0.9.6", "@sidan-lab/sidan-csl-rs-nodejs": "0.9.6", "json-bigint": "^1.0.0" diff --git a/packages/mesh-core-cst/package.json b/packages/mesh-core-cst/package.json index acfd9594..a073fd55 100644 --- a/packages/mesh-core-cst/package.json +++ b/packages/mesh-core-cst/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/core-cst", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -42,7 +42,7 @@ "@harmoniclabs/cbor": "1.3.0", "@harmoniclabs/plutus-data": "1.2.4", "@harmoniclabs/uplc": "1.2.4", - "@meshsdk/common": "1.7.18", + "@meshsdk/common": "1.7.19", "@stricahq/bip32ed25519": "^1.1.0", "@stricahq/cbors": "^1.0.3", "pbkdf2": "^3.1.2" diff --git a/packages/mesh-core/package.json b/packages/mesh-core/package.json index b60a24ad..ecba1c63 100644 --- a/packages/mesh-core/package.json +++ b/packages/mesh-core/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/core", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -33,13 +33,13 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.18", - "@meshsdk/core-csl": "1.7.18", - "@meshsdk/core-cst": "1.7.18", - "@meshsdk/provider": "1.7.18", - "@meshsdk/react": "1.7.18", - "@meshsdk/transaction": "1.7.18", - "@meshsdk/wallet": "1.7.18" + "@meshsdk/common": "1.7.19", + "@meshsdk/core-csl": "1.7.19", + "@meshsdk/core-cst": "1.7.19", + "@meshsdk/provider": "1.7.19", + "@meshsdk/react": "1.7.19", + "@meshsdk/transaction": "1.7.19", + "@meshsdk/wallet": "1.7.19" }, "prettier": "@meshsdk/configs/prettier", "publishConfig": { diff --git a/packages/mesh-provider/package.json b/packages/mesh-provider/package.json index 209e014e..b4436fcd 100644 --- a/packages/mesh-provider/package.json +++ b/packages/mesh-provider/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/provider", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -34,8 +34,8 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.18", - "@meshsdk/core-cst": "1.7.18", + "@meshsdk/common": "1.7.19", + "@meshsdk/core-cst": "1.7.19", "@utxorpc/sdk": "0.6.2", "@utxorpc/spec": "0.10.1", "axios": "^1.7.2" diff --git a/packages/mesh-react/package.json b/packages/mesh-react/package.json index 77fe800e..0a363c11 100644 --- a/packages/mesh-react/package.json +++ b/packages/mesh-react/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/react", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -30,9 +30,9 @@ }, "dependencies": { "react": "^18.2.0", - "@meshsdk/common": "1.7.18", - "@meshsdk/transaction": "1.7.18", - "@meshsdk/wallet": "1.7.18" + "@meshsdk/common": "1.7.19", + "@meshsdk/transaction": "1.7.19", + "@meshsdk/wallet": "1.7.19" }, "devDependencies": { "@meshsdk/configs": "*", diff --git a/packages/mesh-transaction/package.json b/packages/mesh-transaction/package.json index b1d2c450..8290d3c2 100644 --- a/packages/mesh-transaction/package.json +++ b/packages/mesh-transaction/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/transaction", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -35,9 +35,9 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.18", - "@meshsdk/core-csl": "1.7.18", - "@meshsdk/core-cst": "1.7.18", + "@meshsdk/common": "1.7.19", + "@meshsdk/core-csl": "1.7.19", + "@meshsdk/core-cst": "1.7.19", "json-bigint": "^1.0.0" }, "prettier": "@meshsdk/configs/prettier", diff --git a/packages/mesh-wallet/package.json b/packages/mesh-wallet/package.json index b509498f..b8400d51 100644 --- a/packages/mesh-wallet/package.json +++ b/packages/mesh-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/wallet", - "version": "1.7.18", + "version": "1.7.19", "description": "", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -35,10 +35,10 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.18", - "@meshsdk/core-csl": "1.7.18", - "@meshsdk/core-cst": "1.7.18", - "@meshsdk/transaction": "1.7.18", + "@meshsdk/common": "1.7.19", + "@meshsdk/core-csl": "1.7.19", + "@meshsdk/core-cst": "1.7.19", + "@meshsdk/transaction": "1.7.19", "@nufi/dapp-client-cardano": "0.3.5", "@nufi/dapp-client-core": "0.3.5" }, diff --git a/scripts/mesh-cli/package.json b/scripts/mesh-cli/package.json index a7ac27d7..82f9a4db 100644 --- a/scripts/mesh-cli/package.json +++ b/scripts/mesh-cli/package.json @@ -3,7 +3,7 @@ "description": "A quick and easy way to bootstrap your dApps on Cardano using Mesh.", "homepage": "https://meshjs.dev", "author": "MeshJS", - "version": "1.7.18", + "version": "1.7.19", "license": "Apache-2.0", "type": "module", "main": "./dist/index.cjs",