From aa5e3fc5dc4b56fa842beb9b72411ec86b4dd94e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Fri, 23 Feb 2024 10:54:48 +0100 Subject: [PATCH] Allow native USDC `openWithPermit` function --- client/PublicRequestTypes.ts | 4 ++-- src/lib/RequestTypes.ts | 2 +- src/views/SetupSwap.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/PublicRequestTypes.ts b/client/PublicRequestTypes.ts index 554f9315..e48a5492 100644 --- a/client/PublicRequestTypes.ts +++ b/client/PublicRequestTypes.ts @@ -274,9 +274,9 @@ export interface PolygonHtlcCreationInstructions extends RelayRequest { type: 'USDC'; /** * The sender's nonce in the token contract, required when calling the - * contract function `openWithApproval`. + * contract function `openWithPermit`. */ - approval?: { + permit?: { tokenNonce: number, }; } diff --git a/src/lib/RequestTypes.ts b/src/lib/RequestTypes.ts index 7fa425da..98516a56 100644 --- a/src/lib/RequestTypes.ts +++ b/src/lib/RequestTypes.ts @@ -199,7 +199,7 @@ export interface ParsedSetupSwapRequest extends ParsedSimpleRequest { refundAddress: string, } | ({ type: SwapAsset.USDC, - approval?: { + permit?: { tokenNonce: number, }, } & RelayRequest) | { diff --git a/src/views/SetupSwap.vue b/src/views/SetupSwap.vue index 949bffbd..229f8162 100644 --- a/src/views/SetupSwap.vue +++ b/src/views/SetupSwap.vue @@ -196,7 +196,7 @@ export default class SetupSwap extends BitcoinSyncBaseView { keyPath: signer.path, request: this.request.fund.request, relayData: this.request.fund.relayData, - approval: this.request.fund.approval, + permit: this.request.fund.permit, }; }