Skip to content

Commit

Permalink
Merge pull request #325 from torusresearch/fix/vue-demo-update-valida…
Browse files Browse the repository at this point in the history
…tion

Fix validation
  • Loading branch information
chaitanyapotti authored Jul 26, 2024
2 parents d03ef52 + 70e7f2a commit 72ae1e6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion examples/vue-example/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
size="md"
pill
@click="getUserInfo"
data-testid="btnGetUserInfo"
>
Get user info
</Button>
Expand All @@ -44,6 +45,7 @@
size="md"
pill
@click="getOpenloginState"
data-testid="btnGetOpenloginState"
>
Get openlogin state
</Button>
Expand All @@ -56,6 +58,7 @@
size="md"
pill
@click="getEd25519Key"
data-testid="btnGetEd25519Key"
>
Get Ed25519Key
</Button>
Expand All @@ -69,6 +72,7 @@
size="md"
pill
@click="manageMFA"
data-testid="btnManageMFA"
>
Manage MFA
</Button>
Expand All @@ -80,6 +84,7 @@
size="md"
pill
@click="enableMFA"
data-testid="btnEnableMFA"
>
Enable MFA
</Button>
Expand All @@ -96,6 +101,7 @@
pill
:disabled="!ethereumPrivateKeyProvider?.provider"
@click="signMessage"
data-testid="btnSignMessage"
>
Sign test Eth Message
</Button>
Expand All @@ -109,6 +115,7 @@
pill
:disabled="!ethereumPrivateKeyProvider?.provider"
@click="signMpcMessage"
data-testid="btnSignMpcMessage"
>
Sign test Eth Message (MPC)
</Button>
Expand All @@ -122,6 +129,7 @@
pill
:disabled="!ethereumPrivateKeyProvider?.provider"
@click="latestBlock"
data-testid="btnLatestBlock"
>
Fetch latest block
</Button>
Expand All @@ -135,6 +143,7 @@
pill
:disabled="!ethereumPrivateKeyProvider?.provider"
@click="addChain"
data-testid="btnAddChain"
>
Add Sepolia
</Button>
Expand All @@ -148,6 +157,7 @@
pill
:disabled="!ethereumPrivateKeyProvider?.provider"
@click="switchChain"
data-testid="btnSwitchChain"
>
Switch to Sepolia
</Button>
Expand All @@ -161,6 +171,7 @@
pill
:disabled="!ethereumPrivateKeyProvider?.provider"
@click="signV1Message"
data-testid="btnSignV1Message"
>
Sign Typed data v1 test msg
</Button>
Expand All @@ -178,6 +189,7 @@
size="md"
pill
@click="clearConsole"
data-testid="btnClearConsole"
>
Clear console
</Button>
Expand Down Expand Up @@ -626,7 +638,7 @@ const isValidForm = computed(() => {
})
const isValidMFASelection = computed(() => {
if (!selectedMandatoryMFAFactors.value.length) return true;
if (selectedMFAFactors.value?.length && !selectedMandatoryMFAFactors.value.length) return false;
if (selectedMandatoryMFAFactors.value.every((x) => x === MFA_FACTOR.DEVICE)) return false;
return true;
});
Expand Down

0 comments on commit 72ae1e6

Please sign in to comment.