From adfe6f16e9bf87d4a293adf4c458bebe5c1477b4 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Fri, 22 Mar 2024 17:22:56 +0100 Subject: [PATCH] change return type of getSignatureRequestPayload --- src/chains/ethereum.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/chains/ethereum.ts b/src/chains/ethereum.ts index 7bcfe40..40806a4 100644 --- a/src/chains/ethereum.ts +++ b/src/chains/ethereum.ts @@ -81,18 +81,24 @@ export class NearEthAdapter { return this.relayTransaction(signedTx); } - async getSignatureRequstPayload( + async getSignatureRequestPayload( txData: BaseTx, nearGas?: BN - ): Promise { + ): Promise<{ + transaction: FeeMarketEIP1559Transaction; + requestPayload: NearSignPayload; + }> { console.log("Creating Payload for sender:", this.sender); - const { payload } = await this.createTxPayload(txData); + const { transaction, payload } = await this.createTxPayload(txData); console.log("Requesting signature from Near..."); - return this.mpcContract.buildSignatureRequestTx( - payload, - this.derivationPath, - nearGas - ); + return { + transaction, + requestPayload: await this.mpcContract.buildSignatureRequestTx( + payload, + this.derivationPath, + nearGas + ), + }; } reconstructSignature = (