File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
internal/adapters/entrypoints/rest/assets/static Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -258,15 +258,17 @@ function getConfirmationConfig(sectionId) {
258258 if ( ! tempArray [ idx ] ) tempArray [ idx ] = { } ;
259259
260260 if ( input . value . trim ( ) === '' ) {
261- showErrorToast ( `Please enter a non-empty value for "${ input . dataset . field === 'amount' ? 'rBTC amount' : 'confirmations' } ."` ) ;
261+ const amountLabel = configKey === 'btcConfirmations' ? 'BTC amount' : 'rBTC amount' ;
262+ showErrorToast ( `Please enter a non-empty value for "${ input . dataset . field === 'amount' ? amountLabel : 'confirmations' } ."` ) ;
262263 throw new Error ( `Empty ${ input . dataset . field } input` ) ;
263264 }
264265
265266 if ( input . dataset . field === 'amount' ) {
266267 try {
267268 tempArray [ idx ] . amount = etherToWei ( input . value ) . toString ( ) ;
268269 } catch ( error ) {
269- showErrorToast ( `Invalid input "${ input . value } " for rBTC amount. Please enter a valid non-negative number.` ) ;
270+ const amountLabel = configKey === 'btcConfirmations' ? 'BTC amount' : 'rBTC amount' ;
271+ showErrorToast ( `Invalid input "${ input . value } " for ${ amountLabel } . Please enter a valid non-negative number.` ) ;
270272 throw error ;
271273 }
272274 } else if ( input . dataset . field === 'confirmation' ) {
You can’t perform that action at this time.
0 commit comments