Skip to content

Commit 5ca4080

Browse files
authored
feat: improve styles error message (#770)
1 parent 5ca66a7 commit 5ca4080

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

packages/adena-extension/src/components/molecules/approve-transaction/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,16 @@ export const ApproveTransaction: React.FC<ApproveTransactionProps> = ({
107107
}, [currentBalance, maxDepositAmount]);
108108

109109
const maxDepositErrorMessage = useMemo(() => {
110+
if (useNetworkFeeReturn.isLoading) {
111+
return '';
112+
}
113+
110114
if (isMaxDepositError) {
111115
return 'Insufficient balance';
112116
}
113117

114118
return '';
115-
}, [currentBalance, maxDepositAmount]);
119+
}, [useNetworkFeeReturn.isLoading, isMaxDepositError]);
116120

117121
const networkFeeErrorMessage = useMemo(() => {
118122
if (useNetworkFeeReturn.isSimulateError) {

packages/adena-extension/src/components/molecules/network-fee/network-fee.styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const NetworkFeeContainer = styled.div`
1313
padding: 0 16px;
1414
${fonts.captionReg};
1515
color: ${getTheme('red', '_5')};
16+
word-break: break-all;
1617
}
1718
`;
1819

packages/adena-extension/src/components/molecules/storage-deposit/storage-deposit.styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const StorageDepositContainer = styled.div`
1313
padding: 0 16px;
1414
${fonts.captionReg};
1515
color: ${getTheme('red', '_5')};
16+
word-break: break-all;
1617
}
1718
`;
1819

0 commit comments

Comments
 (0)