Skip to content

Commit

Permalink
240101-2
Browse files Browse the repository at this point in the history
  • Loading branch information
BourgesMind committed Jan 1, 2024
1 parent 7061054 commit cac1f5f
Show file tree
Hide file tree
Showing 6 changed files with 809 additions and 114 deletions.
10 changes: 5 additions & 5 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions components/WalletTopRight/SuiWalletTopRight.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use client'
import { createNetworkConfig, SuiClientProvider, WalletProvider } from '@mysten/dapp-kit';
import { type SuiClientOptions } from '@mysten/sui.js/client';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import {getFullnodeUrl} from "@mysten/sui.js/src/client";


const SuiWalletTopRight = () => {

// Config options for the networks you want to connect to
const { networkConfig } = createNetworkConfig({
localnet: { url: getFullnodeUrl('localnet') },
mainnet: { url: getFullnodeUrl('mainnet') },
});
const queryClient = new QueryClient();

return (
<QueryClientProvider client={queryClient}>
<SuiClientProvider networks={networkConfig} defaultNetwork="localnet">
<WalletProvider>
<YourApp />
</WalletProvider>
</SuiClientProvider>
</QueryClientProvider>
);


}

export default SuiWalletTopRight
105 changes: 0 additions & 105 deletions components/WalletTopRight/XDagHubWallet.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions components/WalletTopRight/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use client'
import React from "react";
import {WalletStandardProvider} from '@wallet-standard/react';
import XDagWalletTopRight from "@/components/WalletTopRight/XDagHubWallet";
import SuiWalletTopRight from "@/components/WalletTopRight/SuiWalletTopRight";

const WalletTopRight = () => {
return (
<WalletStandardProvider>
<XDagWalletTopRight></XDagWalletTopRight>
<SuiWalletTopRight></SuiWalletTopRight>
</WalletStandardProvider>
)
}
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
"lint": "next lint --fix --dir pages --dir app --dir components --dir lib --dir layouts --dir scripts"
},
"dependencies": {
"@mysten/dapp-kit": "^0.10.3",
"@mysten/sui.js": "^0.48.1",
"@next/bundle-analyzer": "13.5.3",
"@tailwindcss/forms": "^0.5.4",
"@tailwindcss/typography": "^0.5.9",
"@tanstack/react-query": "^5.17.0",
"@wallet-standard/core": "^1.0.3",
"@wallet-standard/react": "^0.1.4",
"autoprefixer": "^10.4.13",
Expand Down
Loading

0 comments on commit cac1f5f

Please sign in to comment.