Skip to content

Commit

Permalink
Use signMessage to allow signers to introspect tx
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrichina committed Oct 9, 2019
1 parent 7b788e1 commit 094a704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src.ts/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export async function signTransaction(receiverId: string, nonce: number, actions
const transaction = new Transaction({ signerId: accountId, publicKey, nonce, receiverId, actions, blockHash });
const message = serialize(SCHEMA, transaction);
const hash = new Uint8Array(sha256.sha256.array(message));
const signature = await signer.signHash(hash, accountId, networkId);
const signature = await signer.signMessage(message, accountId, networkId);
const signedTx = new SignedTransaction({transaction, signature: new Signature(signature.signature) });
return [hash, signedTx];
}

0 comments on commit 094a704

Please sign in to comment.