Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump initia widget #1215

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Improvements

- [#1215](https://github.com/alleslabs/celatone-frontend/pull/1215) Bump react wallet widget package to support http endpoints
- [#1205](https://github.com/alleslabs/celatone-frontend/pull/1205) Improve EVM contract verify page via external verifier
- [#1185](https://github.com/alleslabs/celatone-frontend/pull/1185) Replace minitia with rollup
- [#1186](https://github.com/alleslabs/celatone-frontend/pull/1186) Bump packages mainly @initia/react-wallet-widget
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"@hookform/resolvers": "^3.9.0",
"@initia/initia.js": "0.2.26",
"@initia/initia.proto": "0.2.4",
"@initia/react-wallet-widget": "0.193.0",
"@initia/react-wallet-widget": "0.195.0",
"@interchain-ui/react": "1.23.9",
"@monaco-editor/react": "^4.6.0",
"@rjsf/chakra-ui": "v5.18.1",
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

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

5 changes: 0 additions & 5 deletions src/lib/pages/custom-network/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ export const DEFAULT_GOV_CONFIG: ChainConfig["features"]["gov"] = {
enabled: false,
};

export const DEFAULT_WALLET_CONFIG: ChainConfig["wallets"] = [
"initia",
"keplr",
];

export const DEFAULT_BECH32_PREFIX = "init";

export const DEFAULT_GAS = {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pages/custom-network/edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const NetworkConfigBody = ({ chainId }: NetworkConfigBodyProps) => {
const json = useMemo(
() =>
JSON.stringify(
omit(chainConfig, ["tier", "chain", "extra", "network_type"])
omit(chainConfig, ["tier", "wallets", "chain", "extra", "network_type"])
),
[chainConfig]
);
Expand Down
5 changes: 2 additions & 3 deletions src/lib/pages/custom-network/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
DEFAULT_POOL_CONFIG,
DEFAULT_PUBLIC_PROJECT_CONFIG,
DEFAULT_SLIP44,
DEFAULT_WALLET_CONFIG,
DEFAULT_WASM_CONFIG,
} from "./constant";

Expand Down Expand Up @@ -368,7 +367,7 @@ export const zAddNetworkManualChainConfigJson = ({
assets,
}: AddNetworkManualForm) => ({
...DEFAULT_CUSTOM_MINITIA_NETWORK,
wallets: DEFAULT_WALLET_CONFIG,
wallets: [],
chainId,
registryChainName,
prettyName,
Expand Down Expand Up @@ -490,7 +489,7 @@ export const zAddNetworkLinkChainConfigJson = z
chainId: val.chainId,
registryChainName: val.chainId,
prettyName: capitalize(val.chainId),
wallets: DEFAULT_WALLET_CONFIG,
wallets: [],
lcd: val.lcd,
rpc: val.rpc,
features: {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/providers/cosmos-kit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const CosmosKitProvider = ({
children: React.ReactNode;
}) => {
const {
chainConfig: { wallets },
chainConfig: { wallets, chain },
} = useCelatoneApp();
const { chainConfigs, registryChains, registryAssets } = useChainConfigs();
const availableChainsEndpoints = Object.values(chainConfigs).reduce<
Expand All @@ -32,6 +32,7 @@ export const CosmosKitProvider = ({

return (
<Provider
key={chain}
chains={registryChains}
assetLists={registryAssets}
wallets={getWallets(wallets)}
Expand Down
4 changes: 4 additions & 0 deletions src/lib/providers/initia-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ export const InitiaWidgetProvider = ({ children }: { children: ReactNode }) => {

return (
<WalletWidgetProvider
key={chainConfig.network_type === "local" ? currentChainId : undefined}
customLayer={
chainConfig.network_type === "local"
? {
apis: {
rest: [{ address: chainConfig.lcd }],
rpc: [{ address: chainConfig.rpc }],
"json-rpc": chainConfig.features.evm.enabled
? [{ address: chainConfig.features.evm.jsonRpc }]
: undefined,
},
bech32_prefix: "init" as const,
chain_id: currentChainId,
Expand Down