Skip to content
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
2 changes: 1 addition & 1 deletion packages/shared/lib/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const errorMessages: {
'LedgerDeviceNotFound': 'error.global.generic',
'LedgerEssenceTooLarge': 'error.global.generic',
// Dust output
'DustError': 'error.global.generic',
'DustError': 'error.send.leavingDust',
}

export const getErrorMessage = (type: ErrorType | ValidatorErrorTypes): string => {
Expand Down
4 changes: 3 additions & 1 deletion packages/shared/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,9 @@
"amountInvalidFormat": "The amount appears to be an invalid number.",
"amountZero": "The amount must be greater than 0.",
"wrongAddressFormat": "Addresses start with the prefix {prefix}.",
"insufficientFunds": "This account has insufficient funds"
"insufficientFunds": "This account has insufficient funds.",
"sendingDust": "You cannot send less than 1 Mi.",
"leavingDust": "You cannot leave less than 1 Mi on your address."
},
"node": {
"invalid": "Please enter a valid URL.",
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/routes/dashboard/wallet/views/Send.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
amountError = locale('error.send.amountTooHigh')
} else if (amountAsI <= 0) {
amountError = locale('error.send.amountZero')
} else if (amountAsI < 1000000) {
amountError = locale('error.send.sendingDust')
}

if (selectedSendType === SEND_TYPE.EXTERNAL) {
Expand Down