bridge_ui: moved to webpack 5 and react-app-rewired, updated solana wallet deps
This commit is contained in:
parent
bbb9986f05
commit
ca0b9cd35c
|
@ -0,0 +1,67 @@
|
||||||
|
const { ProvidePlugin } = require("webpack");
|
||||||
|
|
||||||
|
module.exports = function override(config, env) {
|
||||||
|
return {
|
||||||
|
...config,
|
||||||
|
module: {
|
||||||
|
...config.module,
|
||||||
|
rules: [
|
||||||
|
...config.module.rules,
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
enforce: "pre",
|
||||||
|
use: ["source-map-loader"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.wasm$/,
|
||||||
|
type: "webassembly/async",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
...config.plugins,
|
||||||
|
new ProvidePlugin({
|
||||||
|
Buffer: ["buffer", "Buffer"],
|
||||||
|
process: "process/browser",
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
...config.resolve,
|
||||||
|
fallback: {
|
||||||
|
assert: "assert",
|
||||||
|
buffer: "buffer",
|
||||||
|
console: "console-browserify",
|
||||||
|
constants: "constants-browserify",
|
||||||
|
crypto: "crypto-browserify",
|
||||||
|
domain: "domain-browser",
|
||||||
|
events: "events",
|
||||||
|
fs: false,
|
||||||
|
http: "stream-http",
|
||||||
|
https: "https-browserify",
|
||||||
|
os: "os-browserify/browser",
|
||||||
|
path: "path-browserify",
|
||||||
|
punycode: "punycode",
|
||||||
|
process: "process/browser",
|
||||||
|
querystring: "querystring-es3",
|
||||||
|
stream: "stream-browserify",
|
||||||
|
_stream_duplex: "readable-stream/duplex",
|
||||||
|
_stream_passthrough: "readable-stream/passthrough",
|
||||||
|
_stream_readable: "readable-stream/readable",
|
||||||
|
_stream_transform: "readable-stream/transform",
|
||||||
|
_stream_writable: "readable-stream/writable",
|
||||||
|
string_decoder: "string_decoder",
|
||||||
|
sys: "util",
|
||||||
|
timers: "timers-browserify",
|
||||||
|
tty: "tty-browserify",
|
||||||
|
url: "url",
|
||||||
|
util: "util",
|
||||||
|
vm: "vm-browserify",
|
||||||
|
zlib: "browserify-zlib",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
experiments: {
|
||||||
|
asyncWebAssembly: true,
|
||||||
|
},
|
||||||
|
ignoreWarnings: [/Failed to parse source map/],
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,28 +0,0 @@
|
||||||
const { addBeforeLoader, loaderByName } = require("@craco/craco");
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
webpack: {
|
|
||||||
configure: (webpackConfig) => {
|
|
||||||
const wasmExtensionRegExp = /\.wasm$/;
|
|
||||||
webpackConfig.resolve.extensions.push(".wasm");
|
|
||||||
|
|
||||||
webpackConfig.module.rules.forEach((rule) => {
|
|
||||||
(rule.oneOf || []).forEach((oneOf) => {
|
|
||||||
if (oneOf.loader && oneOf.loader.indexOf("file-loader") >= 0) {
|
|
||||||
oneOf.exclude.push(wasmExtensionRegExp);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const wasmLoader = {
|
|
||||||
test: /\.wasm$/,
|
|
||||||
include: /node_modules\/(bridge|token-bridge)/,
|
|
||||||
loaders: ["wasm-loader"],
|
|
||||||
};
|
|
||||||
|
|
||||||
addBeforeLoader(webpackConfig, loaderByName("file-loader"), wasmLoader);
|
|
||||||
|
|
||||||
return webpackConfig;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,19 +12,11 @@
|
||||||
"@reduxjs/toolkit": "^1.6.1",
|
"@reduxjs/toolkit": "^1.6.1",
|
||||||
"@solana/spl-token": "^0.1.6",
|
"@solana/spl-token": "^0.1.6",
|
||||||
"@solana/spl-token-registry": "^0.2.216",
|
"@solana/spl-token-registry": "^0.2.216",
|
||||||
"@solana/wallet-adapter-base": "^0.5.2",
|
"@solana/wallet-adapter-base": "^0.9.3",
|
||||||
"@solana/wallet-adapter-ledger": "^0.5.2",
|
"@solana/wallet-adapter-react": "^0.15.3",
|
||||||
"@solana/wallet-adapter-material-ui": "^0.11.0",
|
"@solana/wallet-adapter-react-ui": "^0.9.5",
|
||||||
"@solana/wallet-adapter-mathwallet": "^0.5.2",
|
"@solana/wallet-adapter-wallets": "^0.15.3",
|
||||||
"@solana/wallet-adapter-phantom": "^0.5.3",
|
"@solana/web3.js": "^1.35.1",
|
||||||
"@solana/wallet-adapter-react": "^0.11.0",
|
|
||||||
"@solana/wallet-adapter-solflare": "^0.2.3",
|
|
||||||
"@solana/wallet-adapter-sollet": "^0.6.0",
|
|
||||||
"@solana/wallet-adapter-solong": "^0.5.2",
|
|
||||||
"@solana/wallet-adapter-torus": "^0.6.3",
|
|
||||||
"@solana/wallet-adapter-wallets": "^0.9.0",
|
|
||||||
"@solana/wallet-base": "^0.0.1",
|
|
||||||
"@solana/web3.js": "^1.24.1",
|
|
||||||
"@terra-money/wallet-provider": "^3.8.0",
|
"@terra-money/wallet-provider": "^3.8.0",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"bech32": "^1.1.4",
|
"bech32": "^1.1.4",
|
||||||
|
@ -40,15 +32,15 @@
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-redux": "^7.2.4",
|
"react-redux": "^7.2.4",
|
||||||
"react-router-dom": "^5.2.0",
|
"react-router-dom": "^5.2.0",
|
||||||
"react-scripts": "4.0.3",
|
"react-scripts": "5.0.0",
|
||||||
"react-table": "^7.7.0",
|
"react-table": "^7.7.0",
|
||||||
"redux": "^3.7.2",
|
"redux": "^3.7.2",
|
||||||
"use-debounce": "^7.0.0"
|
"use-debounce": "^7.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "craco start",
|
"start": "react-app-rewired start",
|
||||||
"build": "craco build",
|
"build": "react-app-rewired build",
|
||||||
"test": "craco test",
|
"test": "react-app-rewired test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
@ -70,17 +62,39 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@craco/craco": "^6.2.0",
|
|
||||||
"@truffle/hdwallet-provider": "^1.4.1",
|
"@truffle/hdwallet-provider": "^1.4.1",
|
||||||
"@types/node": "^16.6.1",
|
"@types/node": "^16.6.1",
|
||||||
"@types/numeral": "^2.0.2",
|
"@types/numeral": "^2.0.2",
|
||||||
"@types/react-router-dom": "^5.1.8",
|
"@types/react-router-dom": "^5.1.8",
|
||||||
|
"assert": "^2.0.0",
|
||||||
"babel-jest": "^26.6.0",
|
"babel-jest": "^26.6.0",
|
||||||
|
"browserify-zlib": "^0.2.0",
|
||||||
|
"buffer": "^6.0.3",
|
||||||
|
"console-browserify": "^1.2.0",
|
||||||
|
"constants-browserify": "^1.0.0",
|
||||||
|
"crypto-browserify": "^3.12.0",
|
||||||
|
"domain-browser": "^4.22.0",
|
||||||
|
"events": "^3.3.0",
|
||||||
|
"https-browserify": "^1.0.0",
|
||||||
"jest": "^26.6.0",
|
"jest": "^26.6.0",
|
||||||
"jest-watch-typeahead": "^0.6.4",
|
"jest-watch-typeahead": "^0.6.4",
|
||||||
|
"os-browserify": "^0.3.0",
|
||||||
|
"path-browserify": "^1.0.1",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.3.2",
|
||||||
|
"process": "^0.11.10",
|
||||||
|
"punycode": "^2.1.1",
|
||||||
|
"querystring-es3": "^0.2.1",
|
||||||
|
"react-app-rewired": "^2.2.1",
|
||||||
|
"readable-stream": "^3.6.0",
|
||||||
"serve": "^13.0.2",
|
"serve": "^13.0.2",
|
||||||
|
"stream-browserify": "^3.0.0",
|
||||||
|
"stream-http": "^3.2.0",
|
||||||
|
"string_decoder": "^1.3.0",
|
||||||
|
"timers-browserify": "^2.0.12",
|
||||||
"truffle": "^5.4.1",
|
"truffle": "^5.4.1",
|
||||||
"wasm-loader": "^1.3.0"
|
"tty-browserify": "^0.0.1",
|
||||||
|
"url": "^0.11.0",
|
||||||
|
"util": "^0.12.4",
|
||||||
|
"vm-browserify": "^1.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,139 @@
|
||||||
|
import { useCallback, useMemo } from "react";
|
||||||
|
import {
|
||||||
|
Dialog,
|
||||||
|
DialogTitle,
|
||||||
|
Divider,
|
||||||
|
IconButton,
|
||||||
|
List,
|
||||||
|
ListItem,
|
||||||
|
ListItemIcon,
|
||||||
|
ListItemText,
|
||||||
|
makeStyles,
|
||||||
|
} from "@material-ui/core";
|
||||||
|
import CloseIcon from "@material-ui/icons/Close";
|
||||||
|
import { WalletName, WalletReadyState } from "@solana/wallet-adapter-base";
|
||||||
|
import { useWallet, Wallet } from "@solana/wallet-adapter-react";
|
||||||
|
|
||||||
|
const useStyles = makeStyles((theme) => ({
|
||||||
|
flexTitle: {
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
"& > div": {
|
||||||
|
flexGrow: 1,
|
||||||
|
marginRight: theme.spacing(4),
|
||||||
|
},
|
||||||
|
"& > button": {
|
||||||
|
marginRight: theme.spacing(-1),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
height: 24,
|
||||||
|
width: 24,
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
const DetectedWalletListItem = ({
|
||||||
|
wallet,
|
||||||
|
select,
|
||||||
|
onClose,
|
||||||
|
}: {
|
||||||
|
wallet: Wallet;
|
||||||
|
select: (walletName: WalletName) => void;
|
||||||
|
onClose: () => void;
|
||||||
|
}) => {
|
||||||
|
const handleWalletClick = useCallback(() => {
|
||||||
|
select(wallet.adapter.name);
|
||||||
|
onClose();
|
||||||
|
}, [select, onClose, wallet]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ListItem button onClick={handleWalletClick}>
|
||||||
|
<WalletListItem wallet={wallet} text={wallet.adapter.name} />
|
||||||
|
</ListItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const WalletListItem = ({ wallet, text }: { wallet: Wallet; text: string }) => {
|
||||||
|
const classes = useStyles();
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ListItemIcon>
|
||||||
|
<img
|
||||||
|
src={wallet.adapter.icon}
|
||||||
|
alt={wallet.adapter.name}
|
||||||
|
className={classes.icon}
|
||||||
|
/>
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText>{text}</ListItemText>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const SolanaConnectWalletDialog = ({
|
||||||
|
isOpen,
|
||||||
|
onClose,
|
||||||
|
}: {
|
||||||
|
isOpen: boolean;
|
||||||
|
onClose: () => void;
|
||||||
|
}) => {
|
||||||
|
const classes = useStyles();
|
||||||
|
const { wallets, select } = useWallet();
|
||||||
|
|
||||||
|
const [detected, undetected] = useMemo(() => {
|
||||||
|
const detected: Wallet[] = [];
|
||||||
|
const undetected: Wallet[] = [];
|
||||||
|
for (const wallet of wallets) {
|
||||||
|
if (
|
||||||
|
wallet.readyState === WalletReadyState.Installed ||
|
||||||
|
wallet.readyState === WalletReadyState.Loadable
|
||||||
|
) {
|
||||||
|
detected.push(wallet);
|
||||||
|
} else if (wallet.readyState === WalletReadyState.NotDetected) {
|
||||||
|
undetected.push(wallet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [detected, undetected];
|
||||||
|
}, [wallets]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog open={isOpen} onClose={onClose}>
|
||||||
|
<DialogTitle>
|
||||||
|
<div className={classes.flexTitle}>
|
||||||
|
<div>Select your wallet</div>
|
||||||
|
<IconButton onClick={onClose}>
|
||||||
|
<CloseIcon />
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
</DialogTitle>
|
||||||
|
<List>
|
||||||
|
{detected.map((wallet) => (
|
||||||
|
<DetectedWalletListItem
|
||||||
|
wallet={wallet}
|
||||||
|
select={select}
|
||||||
|
onClose={onClose}
|
||||||
|
key={wallet.adapter.name}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
{undetected && <Divider variant="middle" />}
|
||||||
|
{undetected.map((wallet) => (
|
||||||
|
<ListItem
|
||||||
|
button
|
||||||
|
onClick={onClose}
|
||||||
|
component="a"
|
||||||
|
key={wallet.adapter.name}
|
||||||
|
href={wallet.adapter.url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
|
<WalletListItem
|
||||||
|
wallet={wallet}
|
||||||
|
text={"Install " + wallet.adapter.name}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
|
))}
|
||||||
|
</List>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SolanaConnectWalletDialog;
|
|
@ -1,36 +1,35 @@
|
||||||
import { makeStyles } from "@material-ui/core";
|
import { useCallback, useMemo, useState } from "react";
|
||||||
import DisconnectIcon from "@material-ui/icons/LinkOff";
|
|
||||||
import {
|
|
||||||
WalletDisconnectButton,
|
|
||||||
WalletMultiButton,
|
|
||||||
} from "@solana/wallet-adapter-material-ui";
|
|
||||||
import { useSolanaWallet } from "../contexts/SolanaWalletContext";
|
import { useSolanaWallet } from "../contexts/SolanaWalletContext";
|
||||||
|
import SolanaConnectWalletDialog from "./SolanaConnectWalletDialog";
|
||||||
const useStyles = makeStyles((theme) => ({
|
import ToggleConnectedButton from "./ToggleConnectedButton";
|
||||||
root: {
|
|
||||||
textAlign: "center",
|
|
||||||
margin: `${theme.spacing(1)}px auto`,
|
|
||||||
width: "100%",
|
|
||||||
maxWidth: 400,
|
|
||||||
},
|
|
||||||
disconnectButton: {
|
|
||||||
marginLeft: theme.spacing(1),
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
const SolanaWalletKey = () => {
|
const SolanaWalletKey = () => {
|
||||||
const classes = useStyles();
|
const { publicKey, wallet, disconnect } = useSolanaWallet();
|
||||||
const wallet = useSolanaWallet();
|
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
||||||
|
|
||||||
|
const openDialog = useCallback(() => {
|
||||||
|
setIsDialogOpen(true);
|
||||||
|
}, [setIsDialogOpen]);
|
||||||
|
|
||||||
|
const closeDialog = useCallback(() => {
|
||||||
|
setIsDialogOpen(false);
|
||||||
|
}, [setIsDialogOpen]);
|
||||||
|
|
||||||
|
const publicKeyBase58 = useMemo(() => {
|
||||||
|
return publicKey?.toBase58() || "";
|
||||||
|
}, [publicKey]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.root}>
|
<>
|
||||||
<WalletMultiButton />
|
<ToggleConnectedButton
|
||||||
{wallet && (
|
connect={openDialog}
|
||||||
<WalletDisconnectButton
|
disconnect={disconnect}
|
||||||
startIcon={<DisconnectIcon />}
|
connected={!!wallet?.adapter.connected}
|
||||||
className={classes.disconnectButton}
|
pk={publicKeyBase58}
|
||||||
|
walletIcon={wallet?.adapter.icon}
|
||||||
/>
|
/>
|
||||||
)}
|
<SolanaConnectWalletDialog isOpen={isDialogOpen} onClose={closeDialog} />
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
|
Divider,
|
||||||
IconButton,
|
IconButton,
|
||||||
List,
|
List,
|
||||||
ListItem,
|
ListItem,
|
||||||
|
@ -94,6 +95,7 @@ const TerraConnectWalletDialog = ({
|
||||||
<ListItem
|
<ListItem
|
||||||
button
|
button
|
||||||
component="a"
|
component="a"
|
||||||
|
onClick={onClose}
|
||||||
key={"install-" + type + identifier}
|
key={"install-" + type + identifier}
|
||||||
href={url}
|
href={url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
@ -117,6 +119,7 @@ const TerraConnectWalletDialog = ({
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<List>
|
<List>
|
||||||
{filteredConnections}
|
{filteredConnections}
|
||||||
|
{filteredInstallations && <Divider variant="middle" />}
|
||||||
{filteredInstallations}
|
{filteredInstallations}
|
||||||
</List>
|
</List>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
|
@ -8,6 +8,10 @@ const useStyles = makeStyles((theme) => ({
|
||||||
width: "100%",
|
width: "100%",
|
||||||
maxWidth: 400,
|
maxWidth: 400,
|
||||||
},
|
},
|
||||||
|
icon: {
|
||||||
|
height: 24,
|
||||||
|
width: 24,
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const ToggleConnectedButton = ({
|
const ToggleConnectedButton = ({
|
||||||
|
@ -15,11 +19,13 @@ const ToggleConnectedButton = ({
|
||||||
disconnect,
|
disconnect,
|
||||||
connected,
|
connected,
|
||||||
pk,
|
pk,
|
||||||
|
walletIcon,
|
||||||
}: {
|
}: {
|
||||||
connect(): any;
|
connect(): any;
|
||||||
disconnect(): any;
|
disconnect(): any;
|
||||||
connected: boolean;
|
connected: boolean;
|
||||||
pk: string;
|
pk: string;
|
||||||
|
walletIcon?: string;
|
||||||
}) => {
|
}) => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const is0x = pk.startsWith("0x");
|
const is0x = pk.startsWith("0x");
|
||||||
|
@ -31,7 +37,13 @@ const ToggleConnectedButton = ({
|
||||||
size="small"
|
size="small"
|
||||||
onClick={disconnect}
|
onClick={disconnect}
|
||||||
className={classes.button}
|
className={classes.button}
|
||||||
startIcon={<LinkOff />}
|
startIcon={
|
||||||
|
walletIcon ? (
|
||||||
|
<img className={classes.icon} src={walletIcon} alt="Wallet" />
|
||||||
|
) : (
|
||||||
|
<LinkOff />
|
||||||
|
)
|
||||||
|
}
|
||||||
>
|
>
|
||||||
Disconnect {pk.substring(0, is0x ? 6 : 3)}...
|
Disconnect {pk.substring(0, is0x ? 6 : 3)}...
|
||||||
{pk.substr(pk.length - (is0x ? 4 : 3))}
|
{pk.substr(pk.length - (is0x ? 4 : 3))}
|
||||||
|
|
|
@ -1,34 +1,44 @@
|
||||||
import { WalletDialogProvider } from "@solana/wallet-adapter-material-ui";
|
|
||||||
import { useWallet, WalletProvider } from "@solana/wallet-adapter-react";
|
|
||||||
import {
|
import {
|
||||||
getPhantomWallet,
|
ConnectionProvider,
|
||||||
getSolflareWallet,
|
WalletProvider,
|
||||||
getSolletWallet,
|
useWallet,
|
||||||
getMathWallet,
|
} from "@solana/wallet-adapter-react";
|
||||||
|
import {
|
||||||
|
PhantomWalletAdapter,
|
||||||
|
SolflareWalletAdapter,
|
||||||
|
SolletWalletAdapter,
|
||||||
|
CloverWalletAdapter,
|
||||||
|
Coin98WalletAdapter,
|
||||||
|
SlopeWalletAdapter,
|
||||||
|
SolongWalletAdapter,
|
||||||
|
TorusWalletAdapter,
|
||||||
|
SolletExtensionWalletAdapter,
|
||||||
} from "@solana/wallet-adapter-wallets";
|
} from "@solana/wallet-adapter-wallets";
|
||||||
import React, { FC, useMemo } from "react";
|
import { FC, useMemo } from "react";
|
||||||
|
import { SOLANA_HOST } from "../utils/consts";
|
||||||
|
|
||||||
export const SolanaWalletProvider: FC = (props) => {
|
export const SolanaWalletProvider: FC = (props) => {
|
||||||
// @solana/wallet-adapter-wallets includes all the adapters but supports tree shaking --
|
const wallets = useMemo(
|
||||||
// Only the wallets you want to instantiate here will be compiled into your application
|
() => [
|
||||||
const wallets = useMemo(() => {
|
new PhantomWalletAdapter(),
|
||||||
return [
|
new SolflareWalletAdapter(),
|
||||||
getPhantomWallet(),
|
new SolletWalletAdapter(),
|
||||||
getSolflareWallet(),
|
new SolletExtensionWalletAdapter(),
|
||||||
// getTorusWallet({
|
new CloverWalletAdapter(),
|
||||||
// options: { clientId: 'Go to https://developer.tor.us and create a client ID' }
|
new Coin98WalletAdapter(),
|
||||||
// }),
|
new SlopeWalletAdapter(),
|
||||||
// getLedgerWallet(),
|
new SolongWalletAdapter(),
|
||||||
// getSolongWallet(),
|
new TorusWalletAdapter(),
|
||||||
getMathWallet(),
|
],
|
||||||
getSolletWallet(),
|
[]
|
||||||
];
|
);
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WalletProvider wallets={wallets}>
|
<ConnectionProvider endpoint={SOLANA_HOST}>
|
||||||
<WalletDialogProvider>{props.children}</WalletDialogProvider>
|
<WalletProvider wallets={wallets} autoConnect>
|
||||||
|
{props.children}
|
||||||
</WalletProvider>
|
</WalletProvider>
|
||||||
|
</ConnectionProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<svg width="24px" height="24px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
<svg width="24px" height="24px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||||
<path fill="#FFFFFF" d="M12,0c-6.626,0 -12,5.372 -12,12c0,6.627 5.374,12 12,12c6.627,0 12,-5.373 12,-12c0,-6.628 -5.373,-12 -12,-12Zm3.224,17.871c0.188,0.133 0.43,0.166 0.646,0.085c0.215,-0.082 0.374,-0.267 0.422,-0.491c0.507,-2.382 1.737,-8.412 2.198,-10.578c0.035,-0.164 -0.023,-0.334 -0.151,-0.443c-0.129,-0.109 -0.307,-0.14 -0.465,-0.082c-2.446,0.906 -9.979,3.732 -13.058,4.871c-0.195,0.073 -0.322,0.26 -0.316,0.467c0.007,0.206 0.146,0.385 0.346,0.445c1.381,0.413 3.193,0.988 3.193,0.988c0,0 0.847,2.558 1.288,3.858c0.056,0.164 0.184,0.292 0.352,0.336c0.169,0.044 0.348,-0.002 0.474,-0.121c0.709,-0.669 1.805,-1.704 1.805,-1.704c0,0 2.084,1.527 3.266,2.369Zm-6.423,-5.062l0.98,3.231l0.218,-2.046c0,0 3.783,-3.413 5.941,-5.358c0.063,-0.057 0.071,-0.153 0.019,-0.22c-0.052,-0.067 -0.148,-0.083 -0.219,-0.037c-2.5,1.596 -6.939,4.43 -6.939,4.43Z"/>
|
<path fill="#FFFFFF" d="M12,0c-6.626,0 -12,5.372 -12,12c0,6.627 5.374,12 12,12c6.627,0 12,-5.373 12,-12c0,-6.628 -5.373,-12 -12,-12Zm3.224,17.871c0.188,0.133 0.43,0.166 0.646,0.085c0.215,-0.082 0.374,-0.267 0.422,-0.491c0.507,-2.382 1.737,-8.412 2.198,-10.578c0.035,-0.164 -0.023,-0.334 -0.151,-0.443c-0.129,-0.109 -0.307,-0.14 -0.465,-0.082c-2.446,0.906 -9.979,3.732 -13.058,4.871c-0.195,0.073 -0.322,0.26 -0.316,0.467c0.007,0.206 0.146,0.385 0.346,0.445c1.381,0.413 3.193,0.988 3.193,0.988c0,0 0.847,2.558 1.288,3.858c0.056,0.164 0.184,0.292 0.352,0.336c0.169,0.044 0.348,-0.002 0.474,-0.121c0.709,-0.669 1.805,-1.704 1.805,-1.704c0,0 2.084,1.527 3.266,2.369Zm-6.423,-5.062l0.98,3.231l0.218,-2.046c0,0 3.783,-3.413 5.941,-5.358c0.063,-0.057 0.071,-0.153 0.019,-0.22c-0.052,-0.067 -0.148,-0.083 -0.219,-0.037c-2.5,1.596 -6.939,4.43 -6.939,4.43Z"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -1,162 +1,11 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<svg
|
<svg fill="none" version="1.1" viewBox="0 0 490 490" xmlns="http://www.w3.org/2000/svg">
|
||||||
viewBox="0 0 490 490"
|
<path d="m245 490c135.31 0 245-109.69 245-245s-109.69-245-245-245-245 109.69-245 245 109.69 245 245 245zm1-23c122.61 0 222-99.393 222-222s-99.393-222-222-222-222 99.393-222 222 99.393 222 222 222zm-1-17c113.22 0 205-91.782 205-205s-91.782-205-205-205-205 91.782-205 205 91.782 205 205 205zm0.5-25c99.687 0 180.5-80.813 180.5-180.5s-80.813-180.5-180.5-180.5-180.5 80.813-180.5 180.5 80.813 180.5 180.5 180.5zm-10.187-326.34 130.68 226.7 14.012-24.31-116.66-202.39zm-125.31 201.98 111.84-194.03l0.231 0.4 0.22-0.382 132.54 229.93h-28.025l-33.484-58.088c-15.215-4.81-31.414-7.404-48.22-7.404-8.663 0-17.117 0.605-25.336 1.812l16.14-27.956c3.047-0.149 6.113-0.224 9.196-0.224 10.267 0 20.339 0.831 30.154 2.43l-53.195-92.284-98.05 170.1zm76.035-2.949 50.256-87.186-14.012-24.309-86.676 150.37h28.025l0.266-0.462c24.037-14.472 51.619-21.787 81.737-21.787 19.232 0 37.67 3.397 54.747 9.625l-18.775-32.52a187.14 187.14 0 0 0 -35.972 -3.472c-20.842 0-40.885 3.425-59.596 9.744z" clip-rule="evenodd" fill="url(#a)" fill-rule="evenodd"/>
|
||||||
fill="none"
|
<defs>
|
||||||
version="1.1"
|
<linearGradient id="a" x1="462.5" x2="101" y1="490" y2="43.5" gradientUnits="userSpaceOnUse">
|
||||||
id="svg65"
|
<stop stop-color="#5A81FF" offset="0"/>
|
||||||
sodipodi:docname="acala.svg"
|
<stop stop-color="#E40C5B" offset=".524"/>
|
||||||
width="490"
|
<stop stop-color="#FF4C3B" offset="1"/>
|
||||||
height="490"
|
|
||||||
inkscape:version="1.1.1 (c3084ef, 2021-09-22)"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview67"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:zoom="0.89506656"
|
|
||||||
inkscape:cx="638.5"
|
|
||||||
inkscape:cy="245.23316"
|
|
||||||
inkscape:window-width="2560"
|
|
||||||
inkscape:window-height="1387"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="25"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="svg65" />
|
|
||||||
<path
|
|
||||||
fill-rule="evenodd"
|
|
||||||
clip-rule="evenodd"
|
|
||||||
d="M 245,490 C 380.31,490 490,380.31 490,245 490,109.69 380.31,0 245,0 109.69,0 0,109.69 0,245 0,380.31 109.69,490 245,490 Z m 1,-23 C 368.607,467 468,367.607 468,245 468,122.393 368.607,23 246,23 123.393,23 24,122.393 24,245 c 0,122.607 99.393,222 222,222 z m -1,-17 C 358.218,450 450,358.218 450,245 450,131.782 358.218,40 245,40 131.782,40 40,131.782 40,245 c 0,113.218 91.782,205 205,205 z m 0.5,-25 C 345.187,425 426,344.187 426,244.5 426,144.813 345.187,64 245.5,64 145.813,64 65,144.813 65,244.5 65,344.187 145.813,425 245.5,425 Z M 235.313,98.664 365.988,325.36 380,301.05 263.338,98.664 Z M 110,300.641 221.842,106.615 l 0.231,0.4 0.22,-0.382 132.54,229.932 h -28.025 l -33.484,-58.088 c -15.215,-4.81 -31.414,-7.404 -48.22,-7.404 -8.663,0 -17.117,0.605 -25.336,1.812 l 16.14,-27.956 c 3.047,-0.149 6.113,-0.224 9.196,-0.224 10.267,0 20.339,0.831 30.154,2.43 l -53.195,-92.284 -98.05,170.099 z m 76.035,-2.949 50.256,-87.186 -14.012,-24.309 -86.676,150.367 h 28.025 l 0.266,-0.462 c 24.037,-14.472 51.619,-21.787 81.737,-21.787 19.232,0 37.67,3.397 54.747,9.625 l -18.775,-32.52 a 187.142,187.142 0 0 0 -35.972,-3.472 c -20.842,0 -40.885,3.425 -59.596,9.744 z"
|
|
||||||
fill="url(#Acala_new_logo_svg__paint0_linear)"
|
|
||||||
id="path9"
|
|
||||||
style="fill:url(#Acala_new_logo_svg__paint0_linear)" />
|
|
||||||
<defs
|
|
||||||
id="defs63">
|
|
||||||
<linearGradient
|
|
||||||
id="Acala_new_logo_svg__paint0_linear"
|
|
||||||
x1="462.5"
|
|
||||||
y1="490"
|
|
||||||
x2="101"
|
|
||||||
y2="43.5"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
stop-color="#5A81FF"
|
|
||||||
id="stop21" />
|
|
||||||
<stop
|
|
||||||
offset="0.524"
|
|
||||||
stop-color="#E40C5B"
|
|
||||||
id="stop23" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#FF4C3B"
|
|
||||||
id="stop25" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="Acala_new_logo_svg__paint1_linear"
|
|
||||||
x1="1285.41"
|
|
||||||
y1="352.18399"
|
|
||||||
x2="1228.36"
|
|
||||||
y2="60.854"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
offset="0.024"
|
|
||||||
stop-color="#645AFF"
|
|
||||||
id="stop28" />
|
|
||||||
<stop
|
|
||||||
offset="0.484"
|
|
||||||
stop-color="#E40C5B"
|
|
||||||
id="stop30" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#FF4C3B"
|
|
||||||
id="stop32" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="Acala_new_logo_svg__paint2_linear"
|
|
||||||
x1="1285.41"
|
|
||||||
y1="352.18399"
|
|
||||||
x2="1228.36"
|
|
||||||
y2="60.854"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
offset="0.024"
|
|
||||||
stop-color="#645AFF"
|
|
||||||
id="stop35" />
|
|
||||||
<stop
|
|
||||||
offset="0.484"
|
|
||||||
stop-color="#E40C5B"
|
|
||||||
id="stop37" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#FF4C3B"
|
|
||||||
id="stop39" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="Acala_new_logo_svg__paint3_linear"
|
|
||||||
x1="1285.41"
|
|
||||||
y1="352.18399"
|
|
||||||
x2="1228.36"
|
|
||||||
y2="60.854"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
offset="0.024"
|
|
||||||
stop-color="#645AFF"
|
|
||||||
id="stop42" />
|
|
||||||
<stop
|
|
||||||
offset="0.484"
|
|
||||||
stop-color="#E40C5B"
|
|
||||||
id="stop44" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#FF4C3B"
|
|
||||||
id="stop46" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="Acala_new_logo_svg__paint4_linear"
|
|
||||||
x1="1285.41"
|
|
||||||
y1="352.18399"
|
|
||||||
x2="1228.36"
|
|
||||||
y2="60.854"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
offset="0.024"
|
|
||||||
stop-color="#645AFF"
|
|
||||||
id="stop49" />
|
|
||||||
<stop
|
|
||||||
offset="0.484"
|
|
||||||
stop-color="#E40C5B"
|
|
||||||
id="stop51" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#FF4C3B"
|
|
||||||
id="stop53" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="Acala_new_logo_svg__paint5_linear"
|
|
||||||
x1="1285.41"
|
|
||||||
y1="352.18399"
|
|
||||||
x2="1228.36"
|
|
||||||
y2="60.854"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
offset="0.024"
|
|
||||||
stop-color="#645AFF"
|
|
||||||
id="stop56" />
|
|
||||||
<stop
|
|
||||||
offset="0.484"
|
|
||||||
stop-color="#E40C5B"
|
|
||||||
id="stop58" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#FF4C3B"
|
|
||||||
id="stop60" />
|
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -1,28 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generator: Adobe Illustrator 26.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
<svg enable-background="new 0 0 32 32" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||||
<svg version="1.1"
|
|
||||||
id="svg60" inkscape:version="1.1.1 (c3084ef, 2021-09-22)" sodipodi:docname="karura.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 32 32"
|
|
||||||
style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.st0{fill:url(#path9_00000183207226421243246130000000649871513633350020_);}
|
.st0{fill:url(#path9_00000183207226421243246130000000649871513633350020_);}
|
||||||
.st1{fill:url(#path11_00000111907511177103573740000007277726760468908191_);}
|
.st1{fill:url(#path11_00000111907511177103573740000007277726760468908191_);}
|
||||||
</style>
|
</style>
|
||||||
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="namedview62" inkscape:current-layer="svg60" inkscape:cx="95" inkscape:cy="15.958005" inkscape:pagecheckerboard="0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="966" inkscape:window-maximized="1" inkscape:window-width="1728" inkscape:window-x="0" inkscape:window-y="38" inkscape:zoom="6.0157895" pagecolor="#ffffff" showgrid="false">
|
<linearGradient id="a" x1="30.603" x2="9.0668" y1="3.1183" y2="26.527" gradientTransform="matrix(1 0 0 -1 0 34)" gradientUnits="userSpaceOnUse">
|
||||||
</sodipodi:namedview>
|
<stop stop-color="#E40C5B" offset="0"/>
|
||||||
<linearGradient id="path9_00000135687841366068396460000015766857612384780460_" gradientUnits="userSpaceOnUse" x1="30.603" y1="3.1183" x2="9.0668" y2="26.527" gradientTransform="matrix(1 0 0 -1 0 34)">
|
<stop stop-color="#FF4C3B" offset="1"/>
|
||||||
<stop offset="0" style="stop-color:#E40C5B"/>
|
|
||||||
<stop offset="1" style="stop-color:#FF4C3B"/>
|
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
<path id="path9" style="fill:url(#path9_00000135687841366068396460000015766857612384780460_);" d="M22.1,2l-8.6,7.8
|
<path d="m22.1 2l-8.6 7.8c-0.9 0.8-2.1 1.3-3.3 1.3h-2.6v-9.1h-4.6v26h2.5c1.4 0 2.7-0.8 3.4-2 0.5-0.8 0.7-2.5 0.6-3.6-0.1-2.5-0.5-3.2-0.5-3.2 0 1.8-1.8 1.9-1.8 1.9 1.3-1.2 0.6-2.2 0.6-2.2-2.3 1.6-2.9-0.1-2.9-0.3 0.1 0.1 0.7 0.6 2-1.1 1.3-1.8 3.1-4.8 4.2-5.6s2.2-0.7 2.2-0.7 0.6-0.8 2.2-1.5 2.6 0.3 2.6 0.3c-1.6 1.3-3.9 3.5-4 6.6-0.1 2.5 5.4 6.9 4.4 13.3 0.6-1.5 0.8-2.9 0.6-4.7-0.2-1.5-1.1-4.5-1.1-4.5l5.2 7.2h5.8l-11.3-15.5 11.3-10.4h-6.9z" fill="url(#a)"/>
|
||||||
c-0.9,0.8-2.1,1.3-3.3,1.3l-2.6,0l0-9.1H3v26h2.5c1.4,0,2.7-0.8,3.4-2c0,0,0,0,0,0c0.5-0.8,0.7-2.5,0.6-3.6
|
<linearGradient id="b" x1="12.414" x2="10.889" y1="20.185" y2="21.855" gradientTransform="matrix(1 0 0 -1 0 34)" gradientUnits="userSpaceOnUse">
|
||||||
c-0.1-2.5-0.5-3.2-0.5-3.2C9,21,7.2,21.1,7.2,21.1c1.3-1.2,0.6-2.2,0.6-2.2c-2.3,1.6-2.9-0.1-2.9-0.3c0.1,0.1,0.7,0.6,2-1.1
|
<stop stop-color="#E40C5B" offset="0"/>
|
||||||
c1.3-1.8,3.1-4.8,4.2-5.6c1.1-0.8,2.2-0.7,2.2-0.7s0.6-0.8,2.2-1.5c1.6-0.7,2.6,0.3,2.6,0.3c-1.6,1.3-3.9,3.5-4,6.6
|
<stop stop-color="#FF4C3B" offset="1"/>
|
||||||
c-0.1,2.5,5.4,6.9,4.4,13.3c0.6-1.5,0.8-2.9,0.6-4.7c-0.2-1.5-1.1-4.5-1.1-4.5l5.2,7.2H29L17.7,12.4L29,2H22.1z"/>
|
|
||||||
<linearGradient id="path11_00000141442106739365556190000001809957881644179604_" gradientUnits="userSpaceOnUse" x1="12.4138" y1="20.1852" x2="10.8888" y2="21.8552" gradientTransform="matrix(1 0 0 -1 0 34)">
|
|
||||||
<stop offset="0" style="stop-color:#E40C5B"/>
|
|
||||||
<stop offset="1" style="stop-color:#FF4C3B"/>
|
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
<path id="path11" style="fill:url(#path11_00000141442106739365556190000001809957881644179604_);" d="M10.9,12.8
|
<path d="m10.9 12.8c-0.4 0.7-0.4 0.9-0.4 0.9s1.5-0.2 1.9-2c-0.1 0-1 0.3-1.5 1.1z" fill="url(#b)"/>
|
||||||
c-0.4,0.7-0.4,0.9-0.4,0.9s1.5-0.2,1.9-2C12.3,11.7,11.4,12,10.9,12.8L10.9,12.8z"/>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue