From 799a13013410604ee0b7393124b55b072c616c45 Mon Sep 17 00:00:00 2001 From: esaminu Date: Wed, 23 Aug 2023 00:01:37 +0400 Subject: [PATCH] chore: wallet url --- src/lib/selector/fast-auth-wallet.ts | 45 ++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/src/lib/selector/fast-auth-wallet.ts b/src/lib/selector/fast-auth-wallet.ts index ef8e9cb44..8d281b708 100644 --- a/src/lib/selector/fast-auth-wallet.ts +++ b/src/lib/selector/fast-auth-wallet.ts @@ -43,9 +43,9 @@ const resolveWalletUrl = (network: Network, walletUrl?: string) => { switch (network.networkId) { case "mainnet": - return "http://localhost:3000"; + return "https://wallet.near.org/fastauth"; case "testnet": - return "http://localhost:3000"; + return "https://wallet.testnet.near.org/fastauth"; default: throw new Error("Invalid wallet url"); } @@ -195,6 +195,47 @@ const FastAuthWallet: WalletBehaviourFactory< await this.signAndSendTransaction({ receiverId, signerId, actions }); } } + + // async signAndSendTransaction({ + // signerId, + // receiverId, + // actions, + // callbackUrl, + // }) { + // logger.log("signAndSendTransaction", { + // signerId, + // receiverId, + // actions, + // callbackUrl, + // }); + + // const { contract } = store.getState(); + + // if (!_state.wallet.isSignedIn() || !contract) { + // throw new Error("Wallet not signed in"); + // } + + // const account = _state.wallet.account(); + + // return account["signAndSendTransaction"]({ + // receiverId: receiverId || contract.contractId, + // actions: actions.map((action) => createAction(action)), + // walletCallbackUrl: callbackUrl, + // }); + // }, + + // async signAndSendTransactions({ transactions, callbackUrl }) { + // logger.log("signAndSendTransactions", { transactions, callbackUrl }); + + // if (!_state.wallet.isSignedIn()) { + // throw new Error("Wallet not signed in"); + // } + + // return _state.wallet.requestSignTransactions({ + // transactions: await transformTransactions(transactions), + // callbackUrl, + // }); + // }, }; };