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

Key Error when calling polkadot.js api balances.transfer #1539

Closed
edwardmack opened this issue Apr 22, 2021 · 0 comments · Fixed by #1573
Closed

Key Error when calling polkadot.js api balances.transfer #1539

edwardmack opened this issue Apr 22, 2021 · 0 comments · Fixed by #1573

Comments

@edwardmack
Copy link
Member

Describe the bug

  • Using polkadot/api (v4.6.2) calling const transfer = await api.tx.balances.transfer(bobKey.address, 12345).signAndSend(aliceKey); causes error:
Error: Detected -Infinity in Keys, should be >= 2 and <= 11
    at assert (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/@polkadot/util/assert.cjs:34:11)
    at mapCapabilities (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/@polkadot/api/base/capabilities.cjs:52:24)
    at MapSubscriber.project (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/@polkadot/api/base/capabilities.cjs:118:555)
    at MapSubscriber._next (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/rxjs/internal/operators/map.js:49:35)
    at MapSubscriber.Subscriber.next (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/rxjs/internal/Subscriber.js:66:18)
    at CombineLatestSubscriber.notifyNext (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/rxjs/internal/observable/combineLatest.js:97:34)
    at InnerSubscriber._next (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/rxjs/internal/Subscriber.js:66:18)
    at CombineLatestSubscriber.notifyNext (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/rxjs/internal/observable/combineLatest.js:97:34)
    at InnerSubscriber._next (/home/emack/projects/chainsafe/gossamer/tests/polkadotjs_test/node_modules/rxjs/internal/InnerSubscriber.js:28:21)

  • It seems that the transaction still completes.
  • signAndSend is a multi part call, so need to determine what is causing the key error.
  • Some transactions fail with error failed to validate signatures, this may be related.

Expected Behavior

  • Call should not cause error.

Current Behavior

Possible Solution

To Reproduce

Steps to reproduce the behavior:

Log output

Log Output
paste log output...

Specification

  • go version:
  • gossamer version:
  • gossamer commit tag:
  • gossamer commit hash:
  • operating system:
  • additional links:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants