Cater for signature over hash (with version checks) (#655)
* Cater for signature over hash (with version checks) * Allow Submittable signAndSend * isUndefined for nonce check * .sign with backwards compat * e2e tests started * Work around optional callback for Promise * Commit actual e2e test * Promise allows for submitExtrinsic * e2e tests are passing * Bump version, update CHANGELOG
This commit is contained in:
@@ -21,7 +21,7 @@ async function main () {
|
||||
const api = await ApiPromise.create();
|
||||
|
||||
// get the nonce for the admin key
|
||||
const aliceNonce = await api.query.system.accountNonce(ALICE);
|
||||
const nonce = await api.query.system.accountNonce(ALICE);
|
||||
|
||||
// find the actual keypair in the keyring
|
||||
const alicePair = keyring.getPair(ALICE);
|
||||
@@ -34,7 +34,7 @@ async function main () {
|
||||
// Do the transfer and track the actual status
|
||||
api.tx.balances
|
||||
.transfer(recipient, AMOUNT)
|
||||
.sign(alicePair, aliceNonce)
|
||||
.sign(alicePair, { nonce })
|
||||
.send(({ events = [], status, type }) => {
|
||||
console.log('Transaction status:', type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user