-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #424 from MeshJS/feat-IWallet
feat: wallet interface and burner wallet
- Loading branch information
Showing
57 changed files
with
707 additions
and
292 deletions.
There are no files selected for viewing
29 changes: 28 additions & 1 deletion
29
apps/playground/src/components/cardano/connect-browser-wallet.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 |
---|---|---|
@@ -1,15 +1,42 @@ | ||
import { CardanoWallet, useWalletList } from "@meshsdk/react"; | ||
|
||
import { getProvider } from "./mesh-wallet"; | ||
|
||
export default function ConnectBrowserWallet() { | ||
const wallets = useWalletList(); | ||
const hasAvailableWallets = wallets.length > 0; | ||
return ( | ||
<> | ||
{hasAvailableWallets ? ( | ||
<CardanoWallet extensions={[95]} /> | ||
<CommonCardanoWallet /> | ||
) : ( | ||
<>No wallets installed</> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export function CommonCardanoWallet() { | ||
const provider = getProvider(); | ||
|
||
return ( | ||
<CardanoWallet | ||
label={"Connect a Wallet"} | ||
extensions={[95]} | ||
metamask={{ network: "preprod" }} | ||
cardanoPeerConnect={{ | ||
dAppInfo: { | ||
name: "Mesh SDK", | ||
url: "https://meshjs.dev/", | ||
}, | ||
announce: [ | ||
"wss://dev.btt.cf-identity-wallet.metadata.dev.cf-deployments.org", | ||
], | ||
}} | ||
burnerWallet={{ | ||
networkId: 0, | ||
provider: provider, | ||
}} | ||
/> | ||
); | ||
} |
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
4 changes: 2 additions & 2 deletions
4
apps/playground/src/pages/smart-contracts/giftcard/common.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
4 changes: 2 additions & 2 deletions
4
apps/playground/src/pages/smart-contracts/hello-world/common.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
4 changes: 2 additions & 2 deletions
4
apps/playground/src/pages/smart-contracts/marketplace/common.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
4 changes: 2 additions & 2 deletions
4
apps/playground/src/pages/smart-contracts/payment-splitter/common.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
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.