From cd0f6fa5d2727146aa2f7b3cea48eb3d54e88763 Mon Sep 17 00:00:00 2001 From: nabarun Date: Tue, 30 Jul 2024 12:18:53 +0000 Subject: [PATCH] Replace `photon` with `alnt` for laconicd network (#6) Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) - Use MUI dialog component for tx error Co-authored-by: IshaVenikar Co-authored-by: Shreerang Kale Reviewed-on: https://git.vdb.to/cerc-io/laconic-wallet-web/pulls/6 --- package.json | 2 +- src/components/TxErrorDialog.tsx | 22 ++++++++---------- src/screens/AddNetwork.tsx | 1 + src/screens/EditNetwork.tsx | 1 + src/styles/stylesheet.js | 39 ++++++++++++++++++++++++++------ src/utils/constants.ts | 4 ++-- yarn.lock | 10 ++++---- 7 files changed, 53 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index ea6a8a7..6574ed6 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@cerc-io/registry-sdk": "^0.2.4", + "@cerc-io/registry-sdk": "^0.2.5", "@cosmjs/amino": "^0.32.3", "@cosmjs/crypto": "^0.32.3", "@cosmjs/proto-signing": "^0.32.3", diff --git a/src/components/TxErrorDialog.tsx b/src/components/TxErrorDialog.tsx index 8b757b4..898eb4d 100644 --- a/src/components/TxErrorDialog.tsx +++ b/src/components/TxErrorDialog.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Button, Dialog, Portal, Text } from 'react-native-paper'; +import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography } from '@mui/material'; const TxErrorDialog = ({ error, @@ -11,17 +11,15 @@ const TxErrorDialog = ({ hideDialog: () => void; }) => { return ( - - - Transaction Error - - {error} - - - - - - + + Transaction Error + + {error} + + + + + ); }; diff --git a/src/screens/AddNetwork.tsx b/src/screens/AddNetwork.tsx index e1ff217..37fd0e9 100644 --- a/src/screens/AddNetwork.tsx +++ b/src/screens/AddNetwork.tsx @@ -409,6 +409,7 @@ const AddNetwork = () => { mode="contained" loading={isSubmitting} disabled={isSubmitting} + style={styles.networksButton} onPress={handleSubmit(submit)}> {isSubmitting ? 'Adding' : 'Submit'} diff --git a/src/screens/EditNetwork.tsx b/src/screens/EditNetwork.tsx index f6f90be..c721208 100644 --- a/src/screens/EditNetwork.tsx +++ b/src/screens/EditNetwork.tsx @@ -187,6 +187,7 @@ const EditNetwork = ({ route }: EditNetworkProps) => { mode="contained" loading={isSubmitting} disabled={isSubmitting} + style={styles.networksButton} onPress={handleSubmit(submit)}> {isSubmitting ? 'Adding' : 'Submit'} diff --git a/src/styles/stylesheet.js b/src/styles/stylesheet.js index 5c0b5f4..017d59e 100644 --- a/src/styles/stylesheet.js +++ b/src/styles/stylesheet.js @@ -5,6 +5,7 @@ const styles = StyleSheet.create({ marginTop: 20, width: 150, alignSelf: 'center', + marginBottom: 40 }, signLink: { alignItems: 'flex-end', @@ -42,6 +43,7 @@ const styles = StyleSheet.create({ }, signButton: { marginTop: 20, + marginBottom: 20, width: 150, alignSelf: 'center', }, @@ -143,6 +145,7 @@ const styles = StyleSheet.create({ buttonContainer: { flexDirection: 'row', marginLeft: 20, + marginTop: 10, marginBottom: 10, justifyContent: 'space-evenly', }, @@ -204,9 +207,9 @@ const styles = StyleSheet.create({ }, subHeading: { textAlign: 'center', - fontWeight: 'bold', marginBottom: 10, marginTop: 10, + fontSize: 20 }, centerText: { textAlign: 'center', @@ -253,12 +256,30 @@ const styles = StyleSheet.create({ balancePadding: { padding: 8, }, - noActiveSessions: { display: 'flex', alignItems: 'center', marginTop: 12 }, - disconnectSession: { display: 'flex', justifyContent: 'center' }, - sessionItem: { paddingLeft: 12, borderBottomWidth: 0.5 }, - sessionsContainer: { paddingLeft: 12, borderBottomWidth: 0.5 }, + noActiveSessions: { + display: 'flex', + alignItems: 'center', + marginTop: 20, + marginBottom: 20, + }, + disconnectSession: { + display: 'flex', + justifyContent: 'center', + }, + sessionItem: { + paddingLeft: 12, + borderBottomWidth: 0.5, + }, + sessionsContainer: { + paddingLeft: 12, + borderBottomWidth: 0.5, + }, walletConnectUriText: { padding: 10 }, - walletConnectLogo: { width: 24, height: 15, margin: 0 }, + walletConnectLogo: { + width: 24, + height: 15, + margin: 0, + }, selectNetworkText: { fontWeight: 'bold', marginVertical: 10, @@ -275,7 +296,11 @@ const styles = StyleSheet.create({ padding: 8, }, linkContainer: { - paddingBottom: 72 + paddingBottom: 72, + }, + networksButton: { + marginTop: 12, + marginBottom: 20, } }); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 85331f4..d106d61 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -10,10 +10,10 @@ export const DEFAULT_NETWORKS = [ namespace: COSMOS, rpcUrl: process.env.REACT_APP_LACONICD_RPC_URL!, blockExplorerUrl: '', - nativeDenom: 'photon', + nativeDenom: 'alnt', addressPrefix: 'laconic', coinType: '118', - gasPrice: '0.01', + gasPrice: '1', isDefault: true, }, { diff --git a/yarn.lock b/yarn.lock index e768c89..f03785b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1263,10 +1263,10 @@ deepmerge "^3.2.0" hoist-non-react-statics "^3.3.0" -"@cerc-io/registry-sdk@^0.2.4": - version "0.2.4" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.4/registry-sdk-0.2.4.tgz#60e4e75b1e6a957cf2b97490af4fda4af07b105f" - integrity sha512-hRZJP+s+uBvfrqtmQ38pmf74SyfFDC65AVwvWigJGxc6uKJG4jyuMyhsoD1P4XkjwAQSnFO89TuDC5JGkdXyrA== +"@cerc-io/registry-sdk@^0.2.5": + version "0.2.5" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.5/registry-sdk-0.2.5.tgz#9ca19fecb2923520dd6a19946c309ecb2ec780a2" + integrity sha512-/KXAYf9gStaX/rRBMCEeDCexEIpTOFHeHzMK9B3xfCT+SyYZE9WC9GpX299LzBYJKKPsb0/JvnDfip9S1igJtA== dependencies: "@cosmjs/amino" "^0.28.1" "@cosmjs/crypto" "^0.28.1" @@ -13626,6 +13626,8 @@ tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== + dependencies: + punycode "^2.1.0" tr46@^2.1.0: version "2.1.0"