-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bitcoin wallet buttons (#3876)
- Loading branch information
Showing
14 changed files
with
218 additions
and
444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
'@reown/appkit-adapter-bitcoin': patch | ||
'@reown/appkit-wallet-button': patch | ||
'@reown/appkit-utils': patch | ||
'@reown/appkit-common': patch | ||
'@reown/appkit-adapter-ethers': patch | ||
'@reown/appkit-adapter-ethers5': patch | ||
'@reown/appkit-adapter-solana': patch | ||
'@reown/appkit-adapter-wagmi': patch | ||
'@reown/appkit': patch | ||
'@reown/appkit-cdn': patch | ||
'@reown/appkit-cli': patch | ||
'@reown/appkit-core': patch | ||
'@reown/appkit-experimental': patch | ||
'@reown/appkit-polyfills': patch | ||
'@reown/appkit-scaffold-ui': patch | ||
'@reown/appkit-siwe': patch | ||
'@reown/appkit-siwx': patch | ||
'@reown/appkit-ui': patch | ||
'@reown/appkit-wallet': patch | ||
--- | ||
|
||
Added bitcoin support for wallet buttons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
apps/laboratory/src/pages/library/bitcoin-wallet-button.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { BitcoinAdapter } from '@reown/appkit-adapter-bitcoin' | ||
import { type CaipNetwork, createAppKit } from '@reown/appkit/react' | ||
|
||
import { AppKitButtons } from '../../components/AppKitButtons' | ||
import { AppKitWalletButtons } from '../../components/AppKitWalletButtons' | ||
import { ConstantsUtil } from '../../utils/ConstantsUtil' | ||
import { ThemeStore } from '../../utils/StoreUtil' | ||
|
||
const networks = ConstantsUtil.BitcoinNetworks | ||
|
||
const bitcoinAdapter = new BitcoinAdapter({ | ||
networks: networks as CaipNetwork[], | ||
projectId: ConstantsUtil.ProjectId | ||
}) | ||
|
||
const modal = createAppKit({ | ||
adapters: [bitcoinAdapter], | ||
networks, | ||
projectId: ConstantsUtil.ProjectId, | ||
features: { | ||
analytics: true, | ||
email: false, | ||
socials: [] | ||
}, | ||
metadata: ConstantsUtil.Metadata | ||
}) | ||
|
||
ThemeStore.setModal(modal) | ||
|
||
export default function Wagmi() { | ||
return ( | ||
<> | ||
<AppKitButtons /> | ||
<AppKitWalletButtons wallets={ConstantsUtil.BitcoinWalletButtons} /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.