fix: clear merchant screen on delete

This commit is contained in:
Vlad Stan 2023-03-23 09:47:40 +02:00
parent a28cae039c
commit 260bea9ccf
2 changed files with 7 additions and 0 deletions

View file

@ -59,6 +59,12 @@ const merchant = async () => {
toggleMerchantKeys: function (value) {
this.showKeys = value
},
handleMerchantDeleted: function() {
this.merchant = null
this.shippingZones = []
this.activeChatCustomer = ''
this.showKeys = false
},
createMerchant: async function (privateKey) {
try {
const pubkey = nostr.getPublicKey(privateKey)

View file

@ -12,6 +12,7 @@
:inkey="g.user.wallets[0].inkey"
:adminkey="g.user.wallets[0].adminkey"
@show-keys="toggleMerchantKeys"
@merchant-deleted="handleMerchantDeleted"
></merchant-details>
</div>
<div class="col-8"></div>