forked from cerc-io/laconic-wallet-web
Compare commits
3 Commits
e5c5d13c77
...
8ff441a794
Author | SHA1 | Date | |
---|---|---|---|
|
8ff441a794 | ||
b94fd22c76 | |||
657c39e5ed |
@ -2,4 +2,4 @@ REACT_APP_WALLET_CONNECT_PROJECT_ID=
|
|||||||
REACT_APP_DEFAULT_GAS_PRICE=0.025
|
REACT_APP_DEFAULT_GAS_PRICE=0.025
|
||||||
# Reference: https://github.com/cosmos/cosmos-sdk/issues/16020
|
# Reference: https://github.com/cosmos/cosmos-sdk/issues/16020
|
||||||
REACT_APP_GAS_ADJUSTMENT=2
|
REACT_APP_GAS_ADJUSTMENT=2
|
||||||
REACT_APP_LACONICD_RPC_URL=https://laconicd.laconic.com
|
REACT_APP_LACONICD_RPC_URL=https://laconicd-sapo.laconic.com
|
||||||
|
@ -18,6 +18,35 @@ import { createTheme, ThemeProvider } from "@mui/material";
|
|||||||
|
|
||||||
globalThis.Buffer = Buffer;
|
globalThis.Buffer = Buffer;
|
||||||
|
|
||||||
|
window.addEventListener('message', (event: MessageEvent) => {
|
||||||
|
if (event.origin !== 'http://localhost:3001') return;
|
||||||
|
|
||||||
|
if (event.data.type === 'REQUEST_LOCAL_STORAGE') {
|
||||||
|
try {
|
||||||
|
const data = localStorage.getItem('accounts/cosmos:laconic-testnet-2/0');
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
event.source?.postMessage({
|
||||||
|
type: 'ERROR',
|
||||||
|
message: 'Data not found in local storage'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
(event.source as Window)?.postMessage({
|
||||||
|
type: 'LOCAL_STORAGE_DATA',
|
||||||
|
data
|
||||||
|
}, 'http://localhost:3001');
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
(event.source as Window)?.postMessage({
|
||||||
|
type: 'ERROR',
|
||||||
|
message: 'Error accessing local storage'
|
||||||
|
}, 'http://localhost:3001');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const linking = {
|
const linking = {
|
||||||
prefixes: ["https://wallet.laconic.com"],
|
prefixes: ["https://wallet.laconic.com"],
|
||||||
};
|
};
|
||||||
|
@ -288,7 +288,7 @@ const styles = StyleSheet.create({
|
|||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
marginBottom: 3,
|
marginBottom: 3,
|
||||||
color: "black",
|
color: "white",
|
||||||
},
|
},
|
||||||
dataBox: {
|
dataBox: {
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
|
@ -5,17 +5,29 @@ export const EIP155 = 'eip155';
|
|||||||
export const COSMOS = 'cosmos';
|
export const COSMOS = 'cosmos';
|
||||||
export const DEFAULT_NETWORKS = [
|
export const DEFAULT_NETWORKS = [
|
||||||
{
|
{
|
||||||
chainId: 'laconic_9000-1',
|
chainId: 'laconic-testnet-2',
|
||||||
networkName: 'laconicd',
|
networkName: 'laconicd testnet-2',
|
||||||
namespace: COSMOS,
|
namespace: COSMOS,
|
||||||
rpcUrl: process.env.REACT_APP_LACONICD_RPC_URL!,
|
rpcUrl: process.env.REACT_APP_LACONICD_RPC_URL!,
|
||||||
blockExplorerUrl: '',
|
blockExplorerUrl: '',
|
||||||
nativeDenom: 'alnt',
|
nativeDenom: 'alnt',
|
||||||
addressPrefix: 'laconic',
|
addressPrefix: 'laconic',
|
||||||
coinType: '118',
|
coinType: '118',
|
||||||
gasPrice: '1',
|
gasPrice: '0.001',
|
||||||
isDefault: true,
|
isDefault: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
chainId: 'laconic_9000-1',
|
||||||
|
networkName: 'laconicd',
|
||||||
|
namespace: COSMOS,
|
||||||
|
rpcUrl: "https://laconicd.laconic.com",
|
||||||
|
blockExplorerUrl: '',
|
||||||
|
nativeDenom: 'alnt',
|
||||||
|
addressPrefix: 'laconic',
|
||||||
|
coinType: '118',
|
||||||
|
gasPrice: '1',
|
||||||
|
isDefault: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
chainId: '1',
|
chainId: '1',
|
||||||
networkName: EIP155_CHAINS['eip155:1'].name,
|
networkName: EIP155_CHAINS['eip155:1'].name,
|
||||||
|
@ -6,6 +6,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
WALLET_CONNECT_ID: ${WALLET_CONNECT_ID}
|
WALLET_CONNECT_ID: ${WALLET_CONNECT_ID}
|
||||||
|
WALLET_CONNECT_VERIFY_CODE: ${WALLET_CONNECT_VERIFY_CODE}
|
||||||
CERC_DEFAULT_GAS_PRICE: ${CERC_DEFAULT_GAS_PRICE:-0.025}
|
CERC_DEFAULT_GAS_PRICE: ${CERC_DEFAULT_GAS_PRICE:-0.025}
|
||||||
CERC_GAS_ADJUSTMENT: ${CERC_GAS_ADJUSTMENT:-2}
|
CERC_GAS_ADJUSTMENT: ${CERC_GAS_ADJUSTMENT:-2}
|
||||||
CERC_LACONICD_RPC_URL: ${CERC_LACONICD_RPC_URL:-https://laconicd.laconic.com}
|
CERC_LACONICD_RPC_URL: ${CERC_LACONICD_RPC_URL:-https://laconicd.laconic.com}
|
||||||
|
@ -18,4 +18,13 @@ REACT_APP_GAS_ADJUSTMENT=$CERC_GAS_ADJUSTMENT \
|
|||||||
REACT_APP_LACONICD_RPC_URL=$CERC_LACONICD_RPC_URL \
|
REACT_APP_LACONICD_RPC_URL=$CERC_LACONICD_RPC_URL \
|
||||||
yarn build
|
yarn build
|
||||||
|
|
||||||
|
# Define the directory and file path
|
||||||
|
FILE_PATH="/app/build/.well-known/walletconnect.txt"
|
||||||
|
|
||||||
|
# Create the directory if it doesn't exist
|
||||||
|
mkdir -p "$(dirname "$FILE_PATH")"
|
||||||
|
# Write verification code to the file
|
||||||
|
echo "$WALLET_CONNECT_VERIFY_CODE" > "$FILE_PATH"
|
||||||
|
|
||||||
|
# Serve build dir
|
||||||
http-server --proxy http://localhost:80? -p 80 /app/build
|
http-server --proxy http://localhost:80? -p 80 /app/build
|
||||||
|
@ -51,6 +51,9 @@ Instructions for running the `laconic-wallet-web` using [laconic-so](https://git
|
|||||||
|
|
||||||
# Optional
|
# Optional
|
||||||
|
|
||||||
|
# WalletConnect code for hostname verification
|
||||||
|
WALLET_CONNECT_VERIFY_CODE=
|
||||||
|
|
||||||
# Default gas price for txs (default: 0.025)
|
# Default gas price for txs (default: 0.025)
|
||||||
CERC_DEFAULT_GAS_PRICE=
|
CERC_DEFAULT_GAS_PRICE=
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user