From 6a567446d65eb62df501cc35cbbe0113b87a10f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDongLieu=E2=80=9D?= Date: Tue, 19 Nov 2024 11:24:43 +0700 Subject: [PATCH] updates debt when close vault --- script/proposal-vault-1.json | 6 ++++-- x/vaults/keeper/vault.go | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/script/proposal-vault-1.json b/script/proposal-vault-1.json index 71e6df4..4eea5a1 100644 --- a/script/proposal-vault-1.json +++ b/script/proposal-vault-1.json @@ -7,7 +7,8 @@ "min_collateral_ratio": "0.5", "liquidation_ratio":"0.5", "max_debt":"1000000000000000000000000000", - "oracl_script": "44", + "collateral_oracle_script": "44", + "mint_oracle_script":44, "mint_denom": "nomUSD", "mint_symbol":"USD", "stability_fee": "0.1" @@ -20,7 +21,8 @@ "min_collateral_ratio": "0.5", "liquidation_ratio":"0.5", "max_debt":"1000000000000000000000000000", - "oracl_script": "44", + "collateral_oracle_script": "44", + "mint_oracle_script":44, "mint_denom": "nomUSD", "mint_symbol":"USD", "stability_fee": "0.1" diff --git a/x/vaults/keeper/vault.go b/x/vaults/keeper/vault.go index 5e884de..5f8f4a6 100644 --- a/x/vaults/keeper/vault.go +++ b/x/vaults/keeper/vault.go @@ -153,6 +153,7 @@ func (k *Keeper) CloseVault( // Update vault vault.CollateralLocked.Amount = math.ZeroInt() vault.Status = types.CLOSED + vault.Debt.Amount = math.ZeroInt() return k.SetVault(ctx, vault) }