Skip to content

Commit

Permalink
fix: fix omnilock-metamask example bug (ckb-js#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyouxin authored Sep 29, 2022
1 parent 6444501 commit 938b1a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/omni-lock-metamask/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export async function transfer(options: Options): Promise<string> {
"0x" +
"00".repeat(
SerializeRcLockWitnessLock({
signature: new Uint8Array(65),
signature: new Uint8Array(65).buffer,
}).byteLength
)
);
Expand Down Expand Up @@ -155,8 +155,8 @@ export async function transfer(options: Options): Promise<string> {
signedMessage = "0x" + signedMessage.slice(2, -2) + v.toString(16).padStart(2, "0");

const signedWitness = bytes.hexify(blockchain.WitnessArgs.pack({
lock: bytes.hexify( SerializeRcLockWitnessLock({
signature: bytes.bytify(signedMessage),
lock: bytes.hexify(SerializeRcLockWitnessLock({
signature: bytes.bytify(signedMessage).buffer,
})),
}))

Expand Down

0 comments on commit 938b1a8

Please sign in to comment.