Skip to content

Commit

Permalink
Merge pull request #397 from MeshJS/account-index-fix
Browse files Browse the repository at this point in the history
Account index fix
  • Loading branch information
jinglescode authored Nov 18, 2024
2 parents c177f7f + d65a351 commit ab51be0
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 41 deletions.
2 changes: 1 addition & 1 deletion packages/mesh-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/common",
"version": "1.7.18",
"version": "1.7.19",
"description": "",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/mesh-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/contract",
"version": "1.7.18",
"version": "1.7.19",
"description": "",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions packages/mesh-core-csl/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -31,15 +31,15 @@
},
"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",
"tsup": "^8.0.2",
"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"
Expand Down
4 changes: 2 additions & 2 deletions packages/mesh-core-cst/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions packages/mesh-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/core",
"version": "1.7.18",
"version": "1.7.19",
"description": "",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions packages/mesh-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/provider",
"version": "1.7.18",
"version": "1.7.19",
"description": "",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions packages/mesh-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/react",
"version": "1.7.18",
"version": "1.7.19",
"description": "",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -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": "*",
Expand Down
8 changes: 4 additions & 4 deletions packages/mesh-transaction/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/transaction",
"version": "1.7.18",
"version": "1.7.19",
"description": "",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions packages/mesh-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/wallet",
"version": "1.7.18",
"version": "1.7.19",
"description": "",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -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"
},
Expand Down
17 changes: 11 additions & 6 deletions packages/mesh-wallet/src/mesh/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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,
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/mesh-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ab51be0

Please sign in to comment.