diff --git a/src/components/utilcards/ConfirmAccountUpdateCard.vue b/src/components/utilcards/ConfirmAccountUpdateCard.vue index 44755b9cefb169d259845f7771a9a2e7cb25bbe4..8a1bc9e271635729f3d758654e49de944e1009de 100644 --- a/src/components/utilcards/ConfirmAccountUpdateCard.vue +++ b/src/components/utilcards/ConfirmAccountUpdateCard.vue @@ -87,6 +87,7 @@ const updateAuthority = async() => { <Input id="updateAuthority_ownerKey" placeholder="Nothing to add" v-model="ownerKey" class="my-2" /> </div> <Button class="my-2" @click="updateAuthority">Update Authority</Button> + <p>Note: By clicking the above button, the transaction will be created, signed, and broadcasted immediately to the mainnet chain</p> </div> </CardContent> </Card> diff --git a/src/components/utilcards/ConfirmCreateAccountCard.vue b/src/components/utilcards/ConfirmCreateAccountCard.vue index be555319dea2cbc32194e1bdfc6c1424b5e49787..26b178eb9aa025c2f55e8c4bd4169a3da00fe2de 100644 --- a/src/components/utilcards/ConfirmCreateAccountCard.vue +++ b/src/components/utilcards/ConfirmCreateAccountCard.vue @@ -168,6 +168,7 @@ const createAccount = async() => { </div> </RadioGroup> <Button @click="createAccount">Create account</Button> + <p>Note: By clicking the above button, the transaction will be created, signed, and broadcasted immediately to the mainnet chain</p> </div> </CardContent> </Card> diff --git a/src/components/utilcards/SignTransactionCard.vue b/src/components/utilcards/SignTransactionCard.vue index b5b1c208726192c93ce99113b5dba98939d5d959..8f8f2aeef4dcad6b27104559e28235ae905a37c9 100644 --- a/src/components/utilcards/SignTransactionCard.vue +++ b/src/components/utilcards/SignTransactionCard.vue @@ -36,6 +36,15 @@ const sign = async () => { outputData.value = await wallet.value!.signTransaction(tx, authorityLevel); }; +const broadcast = async () => { + const wax = await getWax(); + + const tx = wax.createTransactionFromJson(inputData.value); + tx.sign(outputData.value); + + wax.broadcast(tx); +}; + onMounted(() => { inputData.value = decodeURIComponent(atob(router.currentRoute.value.query.data as string ?? '')); }); @@ -55,7 +64,10 @@ onMounted(() => { <div class="my-4 space-x-4"> <Button :disabled="!hasWallet" @click="sign">Sign transaction</Button> </div> - <Textarea v-model="outputData" placeholder="Signed Transaction output" copy-enabled class="my-4" disabled/> + <Textarea v-model="outputData" placeholder="Signature" copy-enabled class="my-4" disabled/> + <div class="my-4 space-x-4"> + <Button :disabled="!outputData" @click="broadcast">Broadcast signed transaction</Button> + </div> </CardContent> </Card> </template> \ No newline at end of file