File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 2020 RUSTC_WRAPPER : sccache
2121 CC : sccache clang
2222 CXX : sccache clang++
23+ FAUCET_TOPUP_REQ_URL : ' ${{ vars.FAUCET_TOPUP_REQ_URL }}'
2324
2425jobs :
2526 deploy :
Original file line number Diff line number Diff line change 2929
3030### Added
3131
32+ - [ #135 ] (https://github.com/ChainSafe/forest-explorer/pull/135 ) Added link to
33+ request for faucet top-up which is configurable using github env var.
34+
3235### Changed
3336
3437### Removed
Original file line number Diff line number Diff line change @@ -40,7 +40,11 @@ pub fn Faucet(target_network: Network) -> impl IntoView {
4040 ) ;
4141
4242 let ( fading_messages, set_fading_messages) = signal ( HashSet :: new ( ) ) ;
43-
43+ let drip_amount = match target_network {
44+ Network :: Mainnet => crate :: constants:: MAINNET_DRIP_AMOUNT . clone ( ) ,
45+ Network :: Testnet => crate :: constants:: CALIBNET_DRIP_AMOUNT . clone ( ) ,
46+ } ;
47+ let topup_req_url = option_env ! ( "FAUCET_TOPUP_REQ_URL" ) ;
4448 view ! {
4549 { move || {
4650 let errors = faucet. get( ) . get_error_messages( ) ;
@@ -137,6 +141,12 @@ pub fn Faucet(target_network: Network) -> impl IntoView {
137141 { format!( "Rate-limited! {duration}s" ) }
138142 </button>
139143 } . into_any( )
144+ } else if faucet. get( ) . get_faucet_balance( ) < drip_amount {
145+ view! {
146+ <a href={ topup_req_url} target="_blank" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-r" >
147+ "Request Faucet Top-up"
148+ </a>
149+ } . into_any( )
140150 } else {
141151 view! {
142152 <button
You can’t perform that action at this time.
0 commit comments