Skip to content

Commit

Permalink
Remove Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
dvush committed Oct 2, 2020
1 parent ca1ee29 commit 81fb8c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sdk/zksync.js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zksync",
"version": "0.7.0",
"version": "0.7.1",
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions sdk/zksync.js/src/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ export class Signer {
fee: BigNumberish;
nonce: number;
}): ForcedExit {
const typeBytes = Buffer.from([8]);
const typeBytes = new Uint8Array([8]);
const initiatorAccountIdBytes = serializeAccountId(forcedExit.initiatorAccountId);
const targetBytes = serializeAddress(forcedExit.target);
const tokenIdBytes = serializeTokenId(forcedExit.tokenId);
const feeBytes = serializeFeePacked(forcedExit.fee);
const nonceBytes = serializeNonce(forcedExit.nonce);
const msgBytes = Buffer.concat([
const msgBytes = ethers.utils.concat([
typeBytes,
initiatorAccountIdBytes,
targetBytes,
Expand Down Expand Up @@ -141,14 +141,14 @@ export class Signer {
fee: BigNumberish;
nonce: number;
}): ChangePubKey {
const typeBytes = Buffer.from([7]); // Tx type (1 byte)
const typeBytes = new Uint8Array([7]); // Tx type (1 byte)
const accountIdBytes = serializeAccountId(changePubKey.accountId);
const accountBytes = serializeAddress(changePubKey.account);
const pubKeyHashBytes = serializeAddress(changePubKey.newPkHash);
const tokenIdBytes = serializeTokenId(changePubKey.feeTokenId);
const feeBytes = serializeFeePacked(changePubKey.fee);
const nonceBytes = serializeNonce(changePubKey.nonce);
const msgBytes = Buffer.concat([
const msgBytes = ethers.utils.concat([
typeBytes,
accountIdBytes,
accountBytes,
Expand Down

0 comments on commit 81fb8c8

Please sign in to comment.