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

Commit

Permalink
v1.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed Aug 16, 2022
1 parent 1e64ab9 commit f7a88d0
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/printversion.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo "VERSION=1.8.0-beta3" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "VERSION=1.8.3" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
2 changes: 1 addition & 1 deletion bin/printversion.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
VERSION="1.8.0-beta3"
VERSION="1.8.3"
echo "VERSION=$VERSION" >> $GITHUB_ENV
2 changes: 1 addition & 1 deletion native/Cargo.lock

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

2 changes: 1 addition & 1 deletion native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ default-features = false
features = ["napi-6"]

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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zecwallet-lite",
"productName": "Zecwallet Lite",
"version": "1.8.0-beta3",
"version": "1.8.3",
"private": true,
"description": "Zecwallet Lite",
"license": "MIT",
Expand Down
40 changes: 39 additions & 1 deletion src/components/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const ConfirmModalToAddr = ({ toaddr, info }: ConfirmModalToAddrProps) => {

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

const ConfirmModalInternal: React.FC<RouteComponentProps & ConfirmModalProps> = ({
sendPageState,
totalBalance,
info,
sendTransaction,
clearToAddrs,
Expand All @@ -281,6 +283,28 @@ const ConfirmModalInternal: React.FC<RouteComponentProps & ConfirmModalProps> =
const sendingTotal = sendPageState.toaddrs.reduce((s, t) => s + t.amount, 0.0) + defaultFee;
const { bigPart, smallPart } = Utils.splitZecAmountIntoBigSmall(sendingTotal);

// Determine the tx privacy level
let privacyLevel = "";
// 1. If we're sending to a t-address, it is "transparent"
const isToTransparent = sendPageState.toaddrs.map((to) => Utils.isTransparent(to.to)).reduce((p, c) => p || c, false);
if (isToTransparent) {
privacyLevel = "Transparent";
} else {
// 2. If we're sending to sapling or orchard, and don't have enough funds in the pool, it is "AmountsRevealed"
const toSapling = sendPageState.toaddrs
.map((to) => (Utils.isSapling(to.to) ? to.amount : 0))
.reduce((s, c) => s + c, 0);
const toOrchard = sendPageState.toaddrs
.map((to) => (Utils.isUnified(to.to) ? to.amount : 0))
.reduce((s, c) => s + c, 0);
if (toSapling > totalBalance.spendableZ || toOrchard > totalBalance.uabalance) {
privacyLevel = "AmountsRevealed";
} else {
// Else, it is a shielded transaction
privacyLevel = "Shielded";
}
}

const sendButton = () => {
// First, close the confirm modal.
closeModal();
Expand Down Expand Up @@ -367,6 +391,19 @@ const ConfirmModalInternal: React.FC<RouteComponentProps & ConfirmModalProps> =
))}
</div>
<ConfirmModalToAddr toaddr={{ to: "Fee", amount: defaultFee, memo: "" }} info={info} />

<div className={cstyles.well}>
<div className={[cstyles.flexspacebetween, cstyles.margintoplarge].join(" ")}>
<div className={[styles.confirmModalAddress].join(" ")}>Privacy Level</div>
<div className={[cstyles.verticalflex, cstyles.right].join(" ")}>
<div className={cstyles.large}>
<div>
<span>{privacyLevel}</span>
</div>
</div>
</div>
</div>
</div>
</ScrollPane>

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

<ConfirmModal
sendPageState={sendPageState}
totalBalance={totalBalance}
info={info}
sendTransaction={sendTransaction}
openErrorModal={openErrorModal}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class Sidebar extends PureComponent<Props & RouteComponentProps, State> {
openErrorModal(
"Zecwallet Lite",
<div className={cstyles.verticalflex}>
<div className={cstyles.margintoplarge}>Zecwallet Lite v1.8.0-beta3</div>
<div className={cstyles.margintoplarge}>Zecwallet Lite v1.8.3</div>
<div className={cstyles.margintoplarge}>Built with Electron. Copyright (c) 2018-2022, Aditya Kulkarni.</div>
<div className={cstyles.margintoplarge}>
The MIT License (MIT) Copyright (c) 2018-2022 Zecwallet
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Utils {
static V2_LIGHTWALLETD: string = "https://lwdv2.zecwallet.co:1443";

// v3 LightwalletD
static V3_LIGHTWALLETD: string = "https://mainnet.lightwalletd.com:9067";
static V3_LIGHTWALLETD: string = "https://lwdv3.zecwallet.co";

static isUnified(addr: string): boolean {
if (!addr) return false;
Expand Down

0 comments on commit f7a88d0

Please sign in to comment.