File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
routes/$chainSlug/_layout Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import { FaucetBreadcrumbs } from '@/modules/faucet/FaucetBreadcrumbs';
2121import useUserStore from '@/stores/useUser.store' ;
2222import { getBlockExplorerUrl } from '@/utils/chain.utils' ;
2323import wagmiNetworks from '@/utils/wagmiNetworks' ;
24+ import { nrlcToRlc } from '@/utils/nrlcToRlc' ;
2425
2526export const Route = createFileRoute ( '/$chainSlug/_layout/faucet' ) ( {
2627 component : FaucetRoute ,
@@ -93,7 +94,7 @@ function FaucetRoute() {
9394 onSuccess : ( data ) => {
9495 const explorerUrl = getBlockExplorerUrl ( wagmiNetworks . arbitrumSepolia . id ) ;
9596 setSuccessMessage (
96- `${ data . amount } RLC sent to your wallet. View transaction: ${ explorerUrl } /tx/${ data . transactionHash } `
97+ `${ nrlcToRlc ( data . amount ) } RLC sent to your wallet. View transaction: ${ explorerUrl } /tx/${ data . transactionHash } `
9798 ) ;
9899 } ,
99100 onError : ( ) => setSuccessMessage ( '' ) ,
Original file line number Diff line number Diff line change 1+ export function nrlcToRlc ( nrlcValue : number | null | undefined ) {
2+ if ( nrlcValue == null ) {
3+ return '' ;
4+ }
5+ return nrlcValue / 10 ** 9 ;
6+ }
You can’t perform that action at this time.
0 commit comments