Skip to content

Commit

Permalink
fix: Set refreshUriOnError=true as default (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenty22 authored Aug 29, 2024
1 parent 40a09d3 commit 1729412
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tiny-kings-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@node-real/walletkit': patch
---

Set `refreshUriOnError=true` as default
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function EvmHomeViewUriProvider() {

const { wcUri } = useWalletConnectUri({
enabled: isEnabled,
refreshUriOnError: false,
});

setEvmGlobalData({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export function EvmURIConnectingView() {
const isConnected = useIsConnected();
const { wcUri } = useWalletConnectUri({
enabled: status !== CONNECT_STATUS.CONNECTING,
refreshUriOnError: false,
});

const onTryAgain = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/walletkit/src/evm/hooks/useWalletConnectUri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface UseWalletConnectUriProps {
let timer: any;

export function useWalletConnectUri(props: UseWalletConnectUriProps = {}) {
const { enabled = true, refreshUriOnError = false } = props;
const { enabled = true, refreshUriOnError = true } = props;

const { connectAsync } = useConnect();
const { evmConfig, options, log } = useWalletKit();
Expand Down

0 comments on commit 1729412

Please sign in to comment.