skoupidi преди 1 година
родител
ревизия
0ae9bd8a86
променени са 2 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 5 1
      bin/drk/src/token.rs
  2. 1 1
      bin/drk/src/txs_history.rs

+ 5 - 1
bin/drk/src/token.rs

@@ -155,9 +155,13 @@ impl Drk {
 
     /// Reset all token mint authorities frozen status in the wallet.
     pub fn reset_mint_authorities(&self) -> WalletDbResult<()> {
+        println!("Resetting mint authorities frozen status");
         let query =
             format!("UPDATE {} SET {} = 0", *MONEY_TOKENS_TABLE, MONEY_TOKENS_COL_IS_FROZEN,);
-        self.wallet.exec_sql(&query, &[])
+        self.wallet.exec_sql(&query, &[])?;
+        println!("Successfully mint authorities frozen status");
+
+        Ok(())
     }
 
     /// Fetch all token mint authorities from the wallet.

+ 1 - 1
bin/drk/src/txs_history.rs

@@ -43,7 +43,7 @@ impl Drk {
         status: &str,
     ) -> WalletDbResult<String> {
         let query = format!(
-            "INSERT OR UPDATE INTO {} ({}, {}, {}) VALUES (?1, ?2, ?3);",
+            "INSERT OR REPLACE INTO {} ({}, {}, {}) VALUES (?1, ?2, ?3);",
             WALLET_TXS_HISTORY_TABLE,
             WALLET_TXS_HISTORY_COL_TX_HASH,
             WALLET_TXS_HISTORY_COL_STATUS,