* Take gas limit and fees from user * Update text input ui * Use gasPrice from networks data * Use default gas limit from env * Use default gas price if not found in registry * Remove appended denom in gas price * Use gas limit from env * Show error dialog when transaction fails * Calculate gas limit and gas price if not received from dapp * Update example env * Improve syntax --------- Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
29 lines
647 B
TypeScript
29 lines
647 B
TypeScript
import React from 'react';
|
|
import { Button, Dialog, Portal, Text } from 'react-native-paper';
|
|
|
|
const TxErrorDialog = ({
|
|
error,
|
|
visible,
|
|
hideDialog,
|
|
}: {
|
|
error: string;
|
|
visible: boolean;
|
|
hideDialog: () => void;
|
|
}) => {
|
|
return (
|
|
<Portal>
|
|
<Dialog visible={visible} onDismiss={hideDialog}>
|
|
<Dialog.Title>Error sending transaction</Dialog.Title>
|
|
<Dialog.Content>
|
|
<Text variant="bodyMedium">{error}</Text>
|
|
</Dialog.Content>
|
|
<Dialog.Actions>
|
|
<Button onPress={hideDialog}>OK</Button>
|
|
</Dialog.Actions>
|
|
</Dialog>
|
|
</Portal>
|
|
);
|
|
};
|
|
|
|
export default TxErrorDialog;
|