File tree Expand file tree Collapse file tree 2 files changed +26
-21
lines changed
Expand file tree Collapse file tree 2 files changed +26
-21
lines changed Original file line number Diff line number Diff line change @@ -113,15 +113,15 @@ const PAGES = [
113113 } ,
114114 {
115115 path : "/faucet/calibnet_usdfc" ,
116- buttons : [ "Faucet List" , "Transaction History" , "Send " ] ,
116+ buttons : [ "Faucet List" , "Transaction History" , "Claim tUSDFC " ] ,
117117 } ,
118118 {
119119 path : "/faucet/calibnet" ,
120- buttons : [ "Faucet List" , "Transaction History" , "Send " ] ,
120+ buttons : [ "Faucet List" , "Transaction History" , "Claim tFIL " ] ,
121121 } ,
122122 {
123123 path : "/faucet/mainnet" ,
124- buttons : [ "Faucet List" , "Transaction History" , "Send " ] ,
124+ buttons : [ "Faucet List" , "Transaction History" , "Claim FIL " ] ,
125125 } ,
126126] ;
127127
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ fn FaucetInput(faucet: RwSignal<FaucetController>) -> impl IntoView {
3535 if faucet. get( ) . is_send_disabled( ) {
3636 view! {
3737 <button class="btn-disabled" disabled=true >
38- "Sending ..."
38+ "Claiming ..."
3939 </button>
4040 }
4141 . into_any( )
@@ -47,25 +47,30 @@ fn FaucetInput(faucet: RwSignal<FaucetController>) -> impl IntoView {
4747 </button>
4848 }
4949 . into_any( )
50- } else if faucet. get( ) . is_low_balance( ) {
51- view! {
52- <button class="btn-disabled" disabled=true >
53- "Send"
54- </button>
55- }
56- . into_any( )
5750 } else {
58- view! {
59- <button
60- class="btn-enabled"
61- on: click=move |_| {
62- faucet. get( ) . drip( ) ;
63- }
64- >
65- Send
66- </button>
51+ let unit = faucet. get( ) . get_fil_unit( ) ;
52+ let disabled = faucet. get( ) . is_low_balance( ) ;
53+ let btn_class = if disabled { "btn-disabled" } else { "btn-enabled" } ;
54+ if disabled {
55+ view! {
56+ <button class=btn_class disabled=true >
57+ { format!( "Claim {unit}" ) }
58+ </button>
59+ }
60+ . into_any( )
61+ } else {
62+ view! {
63+ <button
64+ class=btn_class
65+ on: click=move |_| {
66+ faucet. get( ) . drip( ) ;
67+ }
68+ >
69+ { format!( "Claim {unit}" ) }
70+ </button>
71+ }
72+ . into_any( )
6773 }
68- . into_any( )
6974 }
7075 } }
7176 </div>
You can’t perform that action at this time.
0 commit comments