Skip to content

Commit 680a696

Browse files
committed
integrated
1 parent a563f71 commit 680a696

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

src/components/deploy-onchain-kyc-popup/deploy-kyc.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default {
230230
},
231231
methods: {
232232
...mapMutations('walletStore', ['setBlockchainUser',
233-
"setCosmosConnection", 'nextStep', 'setOnChainIssuerData', 'updateAnAppOnServer']),
233+
"setCosmosConnection", 'nextStep', 'setOnChainIssuerData', 'updateAnAppOnServer', 'setOnChainBlockchainLabel']),
234234
...mapActions("mainStore", [
235235
"updateAnAppOnServer",
236236
"fetchDIDsForAService",
@@ -345,14 +345,16 @@ export default {
345345
}
346346
},
347347
async queryContract(msg, contractAddress) {
348+
this.setOnChainBlockchainLabel(this.selectedChainId)
348349
console.log('queryContract:: Before calling smartContractQueryRPC(), contractAddress ' + contractAddress)
349350
const result = await smartContractQueryRPC(
350351
this.getCosmosConnection.nonSigningClient || this.nonSigningClient,
351352
contractAddress, msg);
352-
console.log('queryContract:: After calling smartContractQueryRPC(), contractAddress ' + contractAddress)
353+
console.log('queryContract:: After calling smartContractQueryRPC(), result ' + JSON.stringify(result, null, 2))
353354
this.onChainIssuer = result;
354355
this.setOnChainIssuerData(this.onChainIssuer)
355356
this.selectedIssuerDID = this.onChainIssuer.issuer.did
357+
356358
},
357359
358360
async dummyGetDidDocAndProofs() {

src/components/deploy-onchain-kyc-popup/deploy-sbt.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default {
8080
ConnectWalletButton,
8181
},
8282
computed: {
83-
...mapGetters("walletStore", ['getBlockchainUser', 'getCosmosConnection', 'getOnChainIssuerData']),
83+
...mapGetters("walletStore", ['getBlockchainUser', 'getOnChainBlockchainLabel', 'getCosmosConnection', 'getOnChainIssuerData']),
8484
...mapGetters("mainStore", ['getOnChainConfig']),
8585
selectedBlockchain() {
8686
if (this.selectedChainId) {
@@ -122,7 +122,7 @@ export default {
122122
123123
// }
124124
// },
125-
selectedChainId: "cosmos:nibi:nibiru-localnet-0",
125+
selectedChainId: "",
126126
nonSigningClient: null,
127127
chainConfig: {}
128128
}
@@ -147,6 +147,9 @@ export default {
147147
},
148148
async checkIfalreadyDeployed() {
149149
try {
150+
if (!this.selectedChainId || this.selectedChainId == "") {
151+
this.selectedChainId = this.getOnChainBlockchainLabel;
152+
}
150153
this.chainConfig = getCosmosChainConfig(this.selectedChainId)
151154
this.nonSigningClient = await createNonSigningClient(this.chainConfig["rpc"]);
152155

src/store/walletStore.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const walletStore = {
3333
],
3434

3535
onChainIssuerConfig: {},
36-
onChainIssuerData: {}
37-
36+
onChainIssuerData: {},
37+
selectedBlockchainLabel: ""
3838
},
3939
getters: {
4040
getOnChainActiveStep: (state) => {
@@ -57,7 +57,10 @@ const walletStore = {
5757

5858
getOnChainIssuerData: (state) => {
5959
return state.onChainIssuerData
60-
}
60+
},
61+
getOnChainBlockchainLabel(state) {
62+
return state.selectedBlockchainLabel
63+
},
6164
},
6265
mutations: {
6366
nextStep: (state, jumpToStepId = null) => {
@@ -67,6 +70,9 @@ const walletStore = {
6770
state.steps[nextStepId].isActive = true;
6871
},
6972

73+
setOnChainBlockchainLabel(state, payload) {
74+
state.selectedBlockchainLabel = payload
75+
},
7076
setOnChainIssuerData(state, payload) {
7177
state.onChainIssuerData = { ...payload }
7278
},

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,7 @@
17601760

17611761
"@hypersign-protocol/hypersign-kyc-chains-metadata@github:hypersign-protocol/hypersign-kyc-chains-metadata":
17621762
version "1.0.0"
1763-
resolved "https://codeload.github.com/hypersign-protocol/hypersign-kyc-chains-metadata/tar.gz/f20ef0611e0e27f938b810d54635a0b7431ad9cd"
1763+
resolved "https://codeload.github.com/hypersign-protocol/hypersign-kyc-chains-metadata/tar.gz/92016655756917f48e57dee0f154e74765b00978"
17641764

17651765
"@isaacs/cliui@^8.0.2":
17661766
version "8.0.2"

0 commit comments

Comments
 (0)