Skip to content

Commit

Permalink
chore: remove unnecessary await
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Apr 25, 2024
1 parent 871513a commit 621c1d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/common/contracts/warp-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,13 @@ export class WarpContract<T>
}
const warpSigner = new Signature(this.warp, {
signer: async (tx: Transaction) => {
const publicKey = await signer.publicKey;
const dataToSign = await tx.getSignatureData();
const signatureUint8Array = await signer.sign(dataToSign);
const signatureBuffer = Buffer.from(signatureUint8Array);
const id = sha256B64Url(signatureBuffer);
tx.setSignature({
id: id,
owner: toB64Url(publicKey),
owner: toB64Url(signer.publicKey),
signature: toB64Url(signatureBuffer),
});
},
Expand Down

0 comments on commit 621c1d7

Please sign in to comment.