Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/BreadJS/MyPIVXWallet
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadJS committed Jul 7, 2023
2 parents f8fb1cd + 020ba95 commit 7f45d07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,8 @@ export async function createProposal() {
if (getBalance() * COIN < cChainParams.current.proposalFee) {
return createAlert('warning', 'Not enough funds to create a proposal.');
}
await confirmPopup({

const fConfirmed = await confirmPopup({
title: `Create Proposal (cost ${
cChainParams.current.proposalFee / COIN
} ${cChainParams.current.TICKER})`,
Expand All @@ -2430,6 +2431,10 @@ export async function createProposal() {
<input type="number" id="proposalCycles" placeholder="Duration in cycles" style="text-align: center;"><br>
<input type="number" id="proposalPayment" placeholder="${cChainParams.current.TICKER} per cycle" style="text-align: center;"><br>`,
});

// If the user cancelled, then we return
if (!fConfirmed) return;

const strTitle = document.getElementById('proposalTitle').value;
const strUrl = document.getElementById('proposalUrl').value;
const numCycles = parseInt(document.getElementById('proposalCycles').value);
Expand Down

0 comments on commit 7f45d07

Please sign in to comment.