forked from LaconicNetwork/zenith-wallet-web
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 <ishavenikar7@gmail.com> Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Reviewed-on: cerc-io/laconic-wallet-web#6
This commit is contained in:
1 parent
7273165e2c
commit
cd0f6fa5d2
7 files changed
+53
-26
No files matched your search
@@ -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 (
|
||||
<Portal>
|
||||
<Dialog visible={visible} onDismiss={hideDialog}>
|
||||
<Dialog.Title>Transaction Error</Dialog.Title>
|
||||
<Dialog.Content>
|
||||
<Text variant="bodyMedium">{error}</Text>
|
||||
</Dialog.Content>
|
||||
<Dialog.Actions>
|
||||
<Button onPress={hideDialog}>OK</Button>
|
||||
</Dialog.Actions>
|
||||
</Dialog>
|
||||
</Portal>
|
||||
<Dialog open={visible} onClose={hideDialog}>
|
||||
<DialogTitle>Transaction Error</DialogTitle>
|
||||
<DialogContent>
|
||||
<Typography variant="body1">{error}</Typography>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={hideDialog}>OK</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -409,6 +409,7 @@ const AddNetwork = () => {
|
||||
mode="contained"
|
||||
loading={isSubmitting}
|
||||
disabled={isSubmitting}
|
||||
style={styles.networksButton}
|
||||
onPress={handleSubmit(submit)}>
|
||||
{isSubmitting ? 'Adding' : 'Submit'}
|
||||
</Button>
|
||||
|
||||
@@ -187,6 +187,7 @@ const EditNetwork = ({ route }: EditNetworkProps) => {
|
||||
mode="contained"
|
||||
loading={isSubmitting}
|
||||
disabled={isSubmitting}
|
||||
style={styles.networksButton}
|
||||
onPress={handleSubmit(submit)}>
|
||||
{isSubmitting ? 'Adding' : 'Submit'}
|
||||
</Button>
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user