Skip to content

Commit

Permalink
fix: Back UI bug (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworkgr authored Sep 25, 2024
1 parent 7ea99c9 commit 0ba3b42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/popups/ProposalDeposit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,18 @@ const signDeposit = async (isCLI = false) => {
transacting.value = true;
const depot = await depositProposal(depositOptions, isCLI);
if ((depot as DeliverTxResponse).code !== 0 && !isCLI) {
transacting.value = false;
errorMsg.value = (depot as DeliverTxResponse).rawLog ?? toPlainObjectString(depot);
displayState.value = "error";
} else {
transacting.value = false;
cliDepositInput.value = (isCLI ? depot : "") as string;
displayState.value = isCLI ? "CLI" : "deposited";
}
} catch (e) {
console.log(e);
errorMsg.value = "" + e;
transacting.value = false;
displayState.value = "error";
}
logEvent("Sign Popup ProposalDeposit", {
Expand Down
3 changes: 3 additions & 0 deletions src/components/popups/ProposalVote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,18 @@ const signVote = async (isCLI = false) => {
transacting.value = true;
const vote = await (voteOptions && voteProposalFunc(voteOptions, isCLI));
if ((vote as DeliverTxResponse).code !== 0 && !isCLI) {
transacting.value = false;
errorMsg.value = (vote as DeliverTxResponse).rawLog ?? toPlainObjectString(vote);
displayState.value = "error";
} else {
transacting.value = false;
cliVoteInput.value = (isCLI ? vote : "") as string;
displayState.value = isCLI ? "CLI" : "voted";
}
} catch (e) {
console.log(e);
errorMsg.value = "" + e;
transacting.value = false;
displayState.value = "error";
}
Expand Down

0 comments on commit 0ba3b42

Please sign in to comment.