Take laconicd chain id from .env file (#15)
* Take the chain id for namespace from env * Use cosmos chain id from env * Fix env variable names
This commit is contained in:
parent
d65c22facd
commit
d90390a8b4
@ -1 +1,3 @@
|
|||||||
REACT_APP_WALLET_CONNECT_ID=
|
REACT_APP_WALLET_CONNECT_ID=
|
||||||
|
REACT_APP_ETHEREUM_MAINNET_CHAIN_ID=1
|
||||||
|
REACT_APP_LACONICD_CHAIN_ID=laconic_9000-1
|
||||||
|
@ -37,7 +37,7 @@ const walletConnectContext = createContext<ContextValue>({
|
|||||||
|
|
||||||
const web3Modal = new WalletConnectModal({
|
const web3Modal = new WalletConnectModal({
|
||||||
projectId: PROJECT_ID,
|
projectId: PROJECT_ID,
|
||||||
chains: ["eip155:1"],
|
chains: [`eip155:${process.env.REACT_APP_ETHEREUM_MAINNET_CHAIN_ID}`],
|
||||||
});
|
});
|
||||||
|
|
||||||
export const WalletConnectProvider = ({
|
export const WalletConnectProvider = ({
|
||||||
@ -112,14 +112,14 @@ export const WalletConnectProvider = ({
|
|||||||
const proposalNamespace = {
|
const proposalNamespace = {
|
||||||
eip155: {
|
eip155: {
|
||||||
methods: ["personal_sign"],
|
methods: ["personal_sign"],
|
||||||
chains: ["eip155:1"],
|
chains: [`eip155:${process.env.REACT_APP_ETHEREUM_MAINNET_CHAIN_ID}`],
|
||||||
events: [],
|
events: [],
|
||||||
},
|
},
|
||||||
cosmos: {
|
cosmos: {
|
||||||
methods: [
|
methods: [
|
||||||
"cosmos_sendTransaction",
|
"cosmos_sendTransaction",
|
||||||
],
|
],
|
||||||
chains: ["cosmos:laconic_9000-1"], // TODO: Get chain ID from .env
|
chains: [`cosmos:${process.env.REACT_APP_LACONICD_CHAIN_ID}`],
|
||||||
events: [],
|
events: [],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -50,7 +50,7 @@ const SignWithCosmos = () => {
|
|||||||
code: number;
|
code: number;
|
||||||
}>({
|
}>({
|
||||||
topic: session!.topic,
|
topic: session!.topic,
|
||||||
chainId: "cosmos:laconic_9000-1", // TODO: Get chain ID from .env
|
chainId: `cosmos:${process.env.REACT_APP_LACONICD_CHAIN_ID}`,
|
||||||
request: {
|
request: {
|
||||||
method: "cosmos_sendTransaction",
|
method: "cosmos_sendTransaction",
|
||||||
params,
|
params,
|
||||||
|
Loading…
Reference in New Issue
Block a user