Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

substrate: fix nomination to a single validator #8

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/staking-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@chorus-one/signer-fireblocks": "^1.0.0",
"@chorus-one/signer-local": "^1.0.0",
"@chorus-one/solana": "^1.0.0",
"@chorus-one/substrate": "^1.0.0",
"@chorus-one/substrate": "^1.0.1",
"@chorus-one/ton": "^1.0.0",
"@chorus-one/utils": "^1.0.0",
"@commander-js/extra-typings": "^11.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/substrate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chorus-one/substrate",
"version": "1.0.0",
"version": "1.0.1",
"description": "All-in-one toolkit for building staking dApps on Substrate Network SDK blockchains(Polkadot, Kusama, etc.)",
"scripts": {
"build": "rm -fr dist/* && tsc -p tsconfig.mjs.json --outDir dist/mjs && tsc -p tsconfig.cjs.json --outDir dist/cjs && bash ../../scripts/fix-package-json"
Expand Down
3 changes: 3 additions & 0 deletions packages/substrate/src/staker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ export class SubstrateStaker {
throw new Error(`unable to find method ${txCall.section}.${txCall.method}`)
}

if (params.length === 1) {
return { tx: api.tx[txCall.section][txCall.method](params) }
}
return { tx: api.tx[txCall.section][txCall.method](...params) }
}

Expand Down
Loading