From 3006687cb6c64d28ac1d47498a0268283ad8491b Mon Sep 17 00:00:00 2001 From: "Jain, Ankur" Date: Tue, 6 Aug 2024 10:22:31 -0400 Subject: [PATCH] Fix Keplr wallet issue --- package-lock.json | 2 +- package.json | 2 +- .../index.js | 2 +- src/views/PKI/PkiRevocationDistributionPoint.vue | 11 +++++++++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 57b97dc..0387226 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "dcl-ui", - "version": "1.0.16", + "version": "1.0.17", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 510ff0d..fc39020 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dcl-ui", - "version": "1.0.16", + "version": "1.0.17", "description": "A Vuejs based application for managing CSA Distributed Compliance Ledger", "author": "Comcast Inc.", "private": true, diff --git a/src/store/generated/zigbee-alliance/distributed-compliance-ledger/zigbeealliance.distributedcomplianceledger.pki/index.js b/src/store/generated/zigbee-alliance/distributed-compliance-ledger/zigbeealliance.distributedcomplianceledger.pki/index.js index 0db6786..839a22b 100644 --- a/src/store/generated/zigbee-alliance/distributed-compliance-ledger/zigbeealliance.distributedcomplianceledger.pki/index.js +++ b/src/store/generated/zigbee-alliance/distributed-compliance-ledger/zigbeealliance.distributedcomplianceledger.pki/index.js @@ -18,7 +18,7 @@ import { RevokedRootCertificates } from "./module/types/pki/revoked_root_certifi import { UniqueCertificate } from "./module/types/pki/unique_certificate"; export { ApprovedCertificates, ApprovedCertificatesBySubject, ApprovedRootCertificates, Certificate, CertificateIdentifier, ChildCertificates, Grant, PkiRevocationDistributionPoint, PkiRevocationDistributionPointsByIssuerSubjectKeyID, ProposedCertificate, ProposedCertificateRevocation, RejectedCertificate, RevokedCertificates, RevokedRootCertificates, UniqueCertificate }; async function initTxClient(vuexGetters) { - return await txClient(vuexGetters['common/wallet/signer'], { + return await txClient(vuexGetters['keplrSigner'] || vuexGetters['common/wallet/signer'], { addr: vuexGetters['common/env/apiTendermint'] }); } diff --git a/src/views/PKI/PkiRevocationDistributionPoint.vue b/src/views/PKI/PkiRevocationDistributionPoint.vue index fa151f9..db37471 100644 --- a/src/views/PKI/PkiRevocationDistributionPoint.vue +++ b/src/views/PKI/PkiRevocationDistributionPoint.vue @@ -71,8 +71,15 @@ export default { return } - const wallet = this.$store.getters['common/wallet/wallet'] - const account = wallet.accounts[0] + + let account; + + if(this.$store.state.selectedKeplrAccount) { + account = this.$store.state.selectedKeplrAccount; + } else { + const wallet = this.$store.getters['common/wallet/wallet']; + account = wallet && wallet.accounts && wallet.accounts.length > 0 ? wallet.accounts[0] : null; + } const creatorAddress = account.address this.txProcessing = true;