Skip to content

Commit

Permalink
Add order type
Browse files Browse the repository at this point in the history
  • Loading branch information
perekopskiy committed Feb 1, 2022
1 parent 994ce8d commit eca77c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/zksync.js/src/remote-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class RemoteWallet extends AbstractWallet {
validFrom?: number;
validUntil?: number;
}): Promise<Order> {
return await this.callExtSignOrder(order);
return await this.callExtSignOrder({type: 'Order', ...order});
}

override async signSyncSwap(swap: {
Expand Down Expand Up @@ -430,7 +430,7 @@ export class RemoteWallet extends AbstractWallet {
}

/**
* Performs an RPC call to the custom `zkSync_signOrder` method.
* Performs an RPC call to the custom `zkSync_signBatch` method.
*
* @param txs An order data to be signed.
*
Expand All @@ -439,7 +439,7 @@ export class RemoteWallet extends AbstractWallet {
protected async callExtSignOrder(order: any): Promise<Order> {
try {
// For now, we assume that the same method will be used for both signing transactions and orders.
const signedOrder: any = await this.web3Provider.send('zkSync_signOrder', [order]);
const signedOrder: any = await this.web3Provider.send('zkSync_signBatch', [order]);

// Sanity check
if (!signedOrder['signature']) {
Expand Down

0 comments on commit eca77c5

Please sign in to comment.