Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit f7a88d0

Browse files
committed
v1.8.3
1 parent 1e64ab9 commit f7a88d0

File tree

8 files changed

+46
-8
lines changed

8 files changed

+46
-8
lines changed

bin/printversion.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
echo "VERSION=1.8.0-beta3" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
1+
echo "VERSION=1.8.3" | 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="1.8.0-beta3"
2+
VERSION="1.8.3"
33
echo "VERSION=$VERSION" >> $GITHUB_ENV

native/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ default-features = false
1515
features = ["napi-6"]
1616

1717
[dependencies]
18-
zecwalletlitelib = { git = "https://github.com/adityapk00/zecwallet-light-cli", rev = "8d9faccafe0056ad9b5f4e2a64dbba10ba6aeb17" }
18+
zecwalletlitelib = { git = "https://github.com/adityapk00/zecwallet-light-cli", rev = "656f48980cbb7389d38cb616ed327563a11f81dd" }
1919
#zecwalletlitelib = { path = "../../zecwallet-light-cli/lib" }
2020
lazy_static = "1.4.0"
2121

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "zecwallet-lite",
33
"productName": "Zecwallet Lite",
4-
"version": "1.8.0-beta3",
4+
"version": "1.8.3",
55
"private": true,
66
"description": "Zecwallet Lite",
77
"license": "MIT",

src/components/Send.tsx

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ const ConfirmModalToAddr = ({ toaddr, info }: ConfirmModalToAddrProps) => {
233233

234234
return (
235235
<div className={cstyles.well}>
236-
<div className={[cstyles.flexspacebetween, cstyles.margintoplarge].join(" ")}>
236+
<div className={[cstyles.flexspacebetween, cstyles.margintopsmall].join(" ")}>
237237
<div className={[styles.confirmModalAddress].join(" ")}>
238238
{Utils.splitStringIntoChunks(toaddr.to, 6).join(" ")}
239239
</div>
@@ -257,6 +257,7 @@ const ConfirmModalToAddr = ({ toaddr, info }: ConfirmModalToAddrProps) => {
257257
// Internal because we're using withRouter just below
258258
type ConfirmModalProps = {
259259
sendPageState: SendPageState;
260+
totalBalance: TotalBalance;
260261
info: Info;
261262
sendTransaction: (sendJson: SendManyJson[], setSendProgress: (p?: SendProgress) => void) => Promise<string>;
262263
clearToAddrs: () => void;
@@ -268,6 +269,7 @@ type ConfirmModalProps = {
268269

269270
const ConfirmModalInternal: React.FC<RouteComponentProps & ConfirmModalProps> = ({
270271
sendPageState,
272+
totalBalance,
271273
info,
272274
sendTransaction,
273275
clearToAddrs,
@@ -281,6 +283,28 @@ const ConfirmModalInternal: React.FC<RouteComponentProps & ConfirmModalProps> =
281283
const sendingTotal = sendPageState.toaddrs.reduce((s, t) => s + t.amount, 0.0) + defaultFee;
282284
const { bigPart, smallPart } = Utils.splitZecAmountIntoBigSmall(sendingTotal);
283285

286+
// Determine the tx privacy level
287+
let privacyLevel = "";
288+
// 1. If we're sending to a t-address, it is "transparent"
289+
const isToTransparent = sendPageState.toaddrs.map((to) => Utils.isTransparent(to.to)).reduce((p, c) => p || c, false);
290+
if (isToTransparent) {
291+
privacyLevel = "Transparent";
292+
} else {
293+
// 2. If we're sending to sapling or orchard, and don't have enough funds in the pool, it is "AmountsRevealed"
294+
const toSapling = sendPageState.toaddrs
295+
.map((to) => (Utils.isSapling(to.to) ? to.amount : 0))
296+
.reduce((s, c) => s + c, 0);
297+
const toOrchard = sendPageState.toaddrs
298+
.map((to) => (Utils.isUnified(to.to) ? to.amount : 0))
299+
.reduce((s, c) => s + c, 0);
300+
if (toSapling > totalBalance.spendableZ || toOrchard > totalBalance.uabalance) {
301+
privacyLevel = "AmountsRevealed";
302+
} else {
303+
// Else, it is a shielded transaction
304+
privacyLevel = "Shielded";
305+
}
306+
}
307+
284308
const sendButton = () => {
285309
// First, close the confirm modal.
286310
closeModal();
@@ -367,6 +391,19 @@ const ConfirmModalInternal: React.FC<RouteComponentProps & ConfirmModalProps> =
367391
))}
368392
</div>
369393
<ConfirmModalToAddr toaddr={{ to: "Fee", amount: defaultFee, memo: "" }} info={info} />
394+
395+
<div className={cstyles.well}>
396+
<div className={[cstyles.flexspacebetween, cstyles.margintoplarge].join(" ")}>
397+
<div className={[styles.confirmModalAddress].join(" ")}>Privacy Level</div>
398+
<div className={[cstyles.verticalflex, cstyles.right].join(" ")}>
399+
<div className={cstyles.large}>
400+
<div>
401+
<span>{privacyLevel}</span>
402+
</div>
403+
</div>
404+
</div>
405+
</div>
406+
</div>
370407
</ScrollPane>
371408

372409
<div className={cstyles.buttoncontainer}>
@@ -640,6 +677,7 @@ export default class Send extends PureComponent<Props, SendState> {
640677

641678
<ConfirmModal
642679
sendPageState={sendPageState}
680+
totalBalance={totalBalance}
643681
info={info}
644682
sendTransaction={sendTransaction}
645683
openErrorModal={openErrorModal}

src/components/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class Sidebar extends PureComponent<Props & RouteComponentProps, State> {
276276
openErrorModal(
277277
"Zecwallet Lite",
278278
<div className={cstyles.verticalflex}>
279-
<div className={cstyles.margintoplarge}>Zecwallet Lite v1.8.0-beta3</div>
279+
<div className={cstyles.margintoplarge}>Zecwallet Lite v1.8.3</div>
280280
<div className={cstyles.margintoplarge}>Built with Electron. Copyright (c) 2018-2022, Aditya Kulkarni.</div>
281281
<div className={cstyles.margintoplarge}>
282282
The MIT License (MIT) Copyright (c) 2018-2022 Zecwallet

src/utils/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default class Utils {
1111
static V2_LIGHTWALLETD: string = "https://lwdv2.zecwallet.co:1443";
1212

1313
// v3 LightwalletD
14-
static V3_LIGHTWALLETD: string = "https://mainnet.lightwalletd.com:9067";
14+
static V3_LIGHTWALLETD: string = "https://lwdv3.zecwallet.co";
1515

1616
static isUnified(addr: string): boolean {
1717
if (!addr) return false;

0 commit comments

Comments
 (0)