Skip to content

Commit

Permalink
Merge pull request zingolabs#756 from juanky201271/dev_minor_fixes
Browse files Browse the repository at this point in the history
A few random adjustments
  • Loading branch information
juanky201271 authored Nov 25, 2024
2 parents 544bef3 + ae93b38 commit b350cbf
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ buck-out/
# firebase
/**/google-services.json
/**/GoogleService-Info.plist

# Binaries
/rust/test_binaries/bins/
2 changes: 1 addition & 1 deletion components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ const Header: React.FunctionComponent<HeaderProps> = ({
</View>
)}

{showShieldButton && !calculateDisableButtonToShield() && setComputingModalVisible && (
{showShieldButton && !calculateDisableButtonToShield() && setComputingModalVisible && valueTransfers !== null && (
<View style={{ justifyContent: 'center', alignItems: 'center' }}>
<FadeText style={{ fontSize: 8 }}>
{(translate(`history.shield-legend-${calculatePoolsToShield()}`) as string) +
Expand Down
4 changes: 2 additions & 2 deletions components/Send/components/Confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ const Confirm: React.FunctionComponent<ConfirmProps> = ({
<CurrencyAmount amtZec={sendingTotal} price={zecPrice.zecPrice} currency={currency} privacy={false} />
</View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<View style={{ marginHorizontal: 10 }}>
<FadeText style={{ marginTop: 10 }}>{translate('send.confirm-privacy-level') as string}</FadeText>
<View style={{ margin: 10 }}>
<FadeText>{translate('send.confirm-privacy-level') as string}</FadeText>
<RegText>{privacyLevel}</RegText>
</View>
<View style={{ margin: 10 }}>
Expand Down
51 changes: 22 additions & 29 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions rust/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ lazy_static! {
Mutex::new(RefCell::new(None));
}

fn lock_client_return_seed(lightclient: LightClient) -> String {
fn lock_client_return_seed(
lightclient: LightClient,
monitor_mempool: bool,
) -> String {
let lc = Arc::new(lightclient);
let _ = LightClient::start_mempool_monitor(lc.clone());

if monitor_mempool {
let _ = LightClient::start_mempool_monitor(lc.clone());
}

LIGHTCLIENT.lock().unwrap().replace(Some(lc));

Expand Down Expand Up @@ -103,7 +109,7 @@ pub fn init_new(
return format!("Error: {}", e);
}
};
lock_client_return_seed(lightclient)
lock_client_return_seed(lightclient, monitor_mempool)
}

pub fn init_from_seed(
Expand All @@ -130,7 +136,7 @@ pub fn init_from_seed(
return format!("Error: {}", e);
}
};
lock_client_return_seed(lightclient)
lock_client_return_seed(lightclient, monitor_mempool)
}

pub fn init_from_ufvk(
Expand All @@ -157,7 +163,7 @@ pub fn init_from_ufvk(
return format!("Error: {}", e);
}
};
lock_client_return_seed(lightclient)
lock_client_return_seed(lightclient, monitor_mempool)
}

pub fn init_from_b64(
Expand Down Expand Up @@ -191,7 +197,7 @@ pub fn init_from_b64(
return format!("Error: {}", e);
}
};
lock_client_return_seed(lightclient)
lock_client_return_seed(lightclient, monitor_mempool)
}

pub fn save_to_b64() -> String {
Expand Down

0 comments on commit b350cbf

Please sign in to comment.