From f769b95df0248a3b49a9ab4d3074df33ef8e086e Mon Sep 17 00:00:00 2001 From: Nacho Iacovino Date: Sat, 3 Sep 2022 00:24:01 +0200 Subject: [PATCH] Add biconomy support --- src/embeds/nft-drop.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/embeds/nft-drop.tsx b/src/embeds/nft-drop.tsx index b3c9e27..0a8af09 100644 --- a/src/embeds/nft-drop.tsx +++ b/src/embeds/nft-drop.tsx @@ -352,9 +352,13 @@ const App: React.FC = () => { const colorScheme = urlParams.get("theme") || "light"; const primaryColor = urlParams.get("primaryColor") || "blue"; const secondaryColor = urlParams.get("secondaryColor") || "orange"; + const biconomyApiKey = urlParams.get("biconomyApiKey") || ""; + const biconomyApiId = urlParams.get("biconomyApiId") || ""; const ipfsGateway = parseIpfsGateway(urlParams.get("ipfsGateway") || ""); + console.log({biconomyApiId, biconomyApiKey}) + const sdkOptions = useMemo( () => relayerUrl @@ -363,8 +367,17 @@ const App: React.FC = () => { openzeppelin: { relayerUrl }, }, } + : biconomyApiKey && biconomyApiId + ? { + gasless: { + biconomy: { + apiKey: biconomyApiKey, + apiId: biconomyApiId, + }, + }, + } : undefined, - [relayerUrl], + [relayerUrl, biconomyApiKey, biconomyApiId], ); return (