Skip to content

Commit 39b2da8

Browse files
authored
Merge pull request #302 from zingolabs/dev_new_release_2.0.11
New release 2.0.11 - zingolib stable 3.0.1
2 parents 03ccbe5 + 1123892 commit 39b2da8

11 files changed

Lines changed: 118 additions & 85 deletions

File tree

‎bin/printversion.ps1‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
echo "VERSION=2.0.10" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
1+
echo "VERSION=2.0.11" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

‎bin/printversion.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
2-
VERSION="2.0.10"
2+
VERSION="2.0.11"
33
echo "VERSION=$VERSION" >> $GITHUB_ENV

‎native/Cargo.lock‎

Lines changed: 8 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎native/Cargo.toml‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ crate-type = ["cdylib"]
1212
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1313

1414
[dependencies]
15-
zingolib = { git="https://github.com/zingolabs/zingolib", rev = "zingolib_v3.0.0" }
16-
pepper-sync = "0.2.0"
15+
zingolib = { git="https://github.com/zingolabs/zingolib", rev = "zingolib_v3.0.1" }
16+
pepper-sync = { git="https://github.com/zingolabs/zingolib", rev = "zingolib_v3.0.1" }
1717

1818
zcash_address = { version = "0.10" }
1919
zcash_client_backend = { version = "0.21", features = [
@@ -33,11 +33,9 @@ zcash_proofs = { version = "0.26" }
3333
zcash_protocol = { version = "0.7" }
3434
zcash_transparent = { version = "0.6" }
3535

36-
zebra-chain = "5.0.0"
37-
3836
rusqlite = { version = "0.37.0", features = ["bundled"] }
3937

40-
zingo_common_components = { version = "0.2", features = ["for_test"] }
38+
zingo_common_components = { version = "0.2.0", features = ["for_test"] }
4139

4240
bip0039 = { version = "0.13", features = [ "rand" ] }
4341
zip32 = "0.2.0"

‎native/src/lib.rs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ use zcash_protocol::consensus::BlockHeight;
2525
use zip32::AccountId;
2626
use zcash_protocol::consensus::NetworkType;
2727

28+
use zingolib::config::SyncConfig;
29+
use pepper_sync::config::{PerformanceLevel, TransparentAddressDiscovery};
2830
use pepper_sync::keys::transparent;
29-
use pepper_sync::config::{PerformanceLevel, SyncConfig, TransparentAddressDiscovery};
3031
use pepper_sync::wallet::{KeyIdInterface, SyncMode};
3132
use zingolib::config::{ChainType, ZingoConfig, construct_lightwalletd_uri};
3233
use zingolib::data::PollReport;
@@ -800,7 +801,7 @@ fn get_latest_block_wallet(mut cx: FunctionContext) -> JsResult<JsPromise> {
800801
let mut guard = LIGHTCLIENT.write().map_err(|_| ZingolibError::LightclientLockPoisoned)?;
801802
if let Some(lightclient) = &mut *guard {
802803
Ok(RT.block_on(async move {
803-
let wallet = lightclient.wallet.write().await;
804+
let wallet = lightclient.wallet.read().await;
804805
object! { "height" => json::JsonValue::from(wallet.sync_state.last_known_chain_height().map_or(0, u32::from))}.pretty(2)
805806
}))
806807
} else {
@@ -1545,7 +1546,7 @@ fn get_spendable_balance_total(mut cx: FunctionContext) -> JsResult<JsPromise> {
15451546
let mut guard = LIGHTCLIENT.write().map_err(|_| ZingolibError::LightclientLockPoisoned)?;
15461547
if let Some(lightclient) = &mut *guard {
15471548
Ok(RT.block_on(async move {
1548-
let wallet = lightclient.wallet.write().await;
1549+
let wallet = lightclient.wallet.read().await;
15491550
let spendable_balance =
15501551
match wallet.shielded_spendable_balance(AccountId::ZERO, false) {
15511552
Ok(bal) => bal,

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "zingo-pc",
33
"productName": "Zingo PC",
4-
"version": "2.0.10",
4+
"version": "2.0.11",
55
"private": true,
66
"description": "Zingo PC",
77
"license": "MIT",

‎src/App.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function App() {
88
<header className="App-header">
99
<p>Built using CRA electron-builder-typescript Template.</p>
1010
<img src={logo} className="App-logo" alt="logo" />
11-
<p>Zingo PC v2.0.10</p>
11+
<p>Zingo PC v2.0.11</p>
1212
<p>
1313
Edit <code>public/electron.js</code> or <code>src/App.js</code> and save to reload.
1414
</p>

‎src/components/logo/Logo.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const Logo = ({ readOnly, onlyVersion }: LogoProps) => {
1212

1313
return (
1414
<>
15-
<div style={{ color: Utils.getCssVariable('--color-zingo'), fontWeight: "bold", marginBottom: 10 }}>Zingo PC v2.0.10</div>
15+
<div style={{ color: Utils.getCssVariable('--color-zingo'), fontWeight: "bold", marginBottom: 10 }}>Zingo PC v2.0.11</div>
1616
{!onlyVersion && (
1717
<div>
1818
<img src={logo} width="70" alt="logo" style={{ borderRadius: 5, marginRight: 10 }} />

‎src/components/send/Send.tsx‎

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import cstyles from "../common/Common.module.css";
44
import {
55
ToAddrClass,
66
SendPageStateClass,
7-
AddressBookEntryClass,
87
ValueTransferClass,
98
ServerChainNameEnum,
109
} from "../appstate";
@@ -36,7 +35,6 @@ const Send: React.FC<SendProps> = ({
3635
info,
3736
totalBalance,
3837
readOnly,
39-
addressBook,
4038
fetchError,
4139
valueTransfers,
4240
currentWallet,
@@ -56,7 +54,7 @@ const Send: React.FC<SendProps> = ({
5654
const [shieldFee, setShieldFee] = useState<number>(0);
5755

5856
useEffect(() => {
59-
// set somePending as well here when I know there is something new in ValueTransfers
57+
// set somePending as well here when I know there is something new in ValueTransfers
6058
const pending: number =
6159
valueTransfers.length > 0 ? valueTransfers.filter((vt: ValueTransferClass) => vt.confirmations >= 0 && vt.confirmations < 3).length : 0;
6260
setAnyPending(pending > 0);
@@ -194,14 +192,6 @@ const Send: React.FC<SendProps> = ({
194192
setModalIsOpen(false);
195193
};
196194

197-
const getLabelAddressBook = (addr: string) => {
198-
// Find the addr in addresses
199-
const label: AddressBookEntryClass | undefined = addressBook.find((ab: AddressBookEntryClass) => ab.address === addr);
200-
const labelStr: string = label ? ` [ ${label.label} ]` : "";
201-
202-
return labelStr;
203-
};
204-
205195
const calculateSendFee = async (): Promise<{fee: number, error: string, spendable: number}> => {
206196
let _fee: number = 0;
207197
let _error: string = '';
@@ -323,30 +313,24 @@ const Send: React.FC<SendProps> = ({
323313
<div className={[styles.horizontalcontainer].join(" ")}>
324314
<div className={cstyles.containermarginleft}>
325315
<ScrollPaneTop offsetHeight={260}>
326-
{[sendPageState.toaddr].map((toaddr: ToAddrClass, index: number) => {
327-
return (
328-
<ToAddrBox
329-
key={index}
330-
toaddr={toaddr}
331-
zecPrice={info.zecPrice}
332-
updateToField={updateToField}
333-
fromAmount={totalAmountAvailable}
334-
fromAmountDefault={totalBalance.totalSpendableBalance}
335-
setMaxAmount={setMaxAmount}
336-
setSendButtonEnabled={setSendButtonEnabled}
337-
sendFee={sendFee}
338-
sendFeeError={sendFeeError}
339-
fetchSendFeeAndErrorAndSpendable={fetchSendFeeAndErrorAndSpendable}
340-
setSendFee={setSendFee}
341-
setSendFeeError={setSendFeeError}
342-
setTotalAmountAvailable={setTotalAmountAvailable}
343-
label={getLabelAddressBook(toaddr.to)}
344-
serverChainName={currentWallet ? currentWallet.chain_name : ServerChainNameEnum.mainChainName}
345-
block={info.latestBlock >= info.walletHeight ? info.latestBlock : info.walletHeight}
346-
currencyName={info.currencyName}
347-
/>
348-
);
349-
})}
316+
<ToAddrBox
317+
toaddr={sendPageState.toaddr}
318+
zecPrice={info.zecPrice}
319+
updateToField={updateToField}
320+
fromAmount={totalAmountAvailable}
321+
fromAmountDefault={totalBalance.totalSpendableBalance}
322+
setMaxAmount={setMaxAmount}
323+
setSendButtonEnabled={setSendButtonEnabled}
324+
sendFee={sendFee}
325+
sendFeeError={sendFeeError}
326+
fetchSendFeeAndErrorAndSpendable={fetchSendFeeAndErrorAndSpendable}
327+
setSendFee={setSendFee}
328+
setSendFeeError={setSendFeeError}
329+
setTotalAmountAvailable={setTotalAmountAvailable}
330+
serverChainName={currentWallet ? currentWallet.chain_name : ServerChainNameEnum.mainChainName}
331+
block={info.latestBlock >= info.walletHeight ? info.latestBlock : info.walletHeight}
332+
currencyName={info.currencyName}
333+
/>
350334
</ScrollPaneTop>
351335
</div>
352336

0 commit comments

Comments
 (0)