Skip to content

Commit

Permalink
Merge branch 'btc-wallet-v' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Feb 17, 2025
2 parents e5e206b + 7ac8cdb commit 47fc043
Show file tree
Hide file tree
Showing 4 changed files with 695 additions and 23 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"babel-loader": "^9.1.3",
"bn.js": "^5.2.1",
"borsh": "^0.7.0",
"btc-wallet": "^0.5.18-beta",
"crypto-browserify": "3.12.0",
"decimal.js": "^10.4.1",
"eslint-plugin-prettier": "^4.2.1",
Expand Down
22 changes: 12 additions & 10 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Integrations } from "@sentry/tracing";
import posthogJs from "posthog-js";
import { useIdle, useInterval } from "react-use";
import ModalReact from "react-modal";

import { BtcWalletSelectorContextProvider } from "btc-wallet";
import "../styles/global.css";
import LoadingBar from "react-top-loading-bar";
import { useRouter } from "next/router";
Expand Down Expand Up @@ -198,15 +198,17 @@ export default function MyApp({ Component, pageProps }: AppProps) {
progress={progress}
onLoaderFinished={() => setProgress(0)}
/>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<Head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Burrow Finance</title>
</Head>
<Upgrade Component={Component} pageProps={pageProps} />
</PersistGate>
</Provider>
<BtcWalletSelectorContextProvider>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<Head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Burrow Finance</title>
</Head>
<Upgrade Component={Component} pageProps={pageProps} />
</PersistGate>
</Provider>
</BtcWalletSelectorContextProvider>
{isBlocked && blockFeatureEnabled && (
<div
className="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center"
Expand Down
5 changes: 5 additions & 0 deletions utils/wallet-selector-compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import BN from "bn.js";
import { map, distinctUntilChanged } from "rxjs";
import { setupKeypom } from "@keypom/selector";
import { setupOKXWallet } from "@near-wallet-selector/okx-wallet";
import { setupBTCWallet } from "btc-wallet";
// @ts-nocheck
import type { Config } from "@wagmi/core";
// @ts-nocheck
Expand Down Expand Up @@ -156,6 +157,10 @@ export const getWalletSelector = async ({ onAccountChange }: GetWalletSelectorAr
web3Modal,
alwaysOnboardDuringSignIn: true,
} as any),
setupBTCWallet({
autoConnect: true,
env: "mainnet",
}) as any,
setupOKXWallet({}),
myNearWallet,
setupSender() as any,
Expand Down
Loading

0 comments on commit 47fc043

Please sign in to comment.