Skip to content

Commit

Permalink
chore: wallet url
Browse files Browse the repository at this point in the history
  • Loading branch information
esaminu committed Aug 22, 2023
1 parent c5a2b03 commit 799a130
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions src/lib/selector/fast-auth-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -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,
// });
// },
};
};

Expand Down

0 comments on commit 799a130

Please sign in to comment.