From 99f4f608e49be6901166bf6f80999e0e15aed90e Mon Sep 17 00:00:00 2001 From: hal3e Date: Tue, 3 Dec 2024 12:49:30 +0100 Subject: [PATCH] pr comments --- e2e/tests/providers.rs | 4 +++- packages/fuels-accounts/src/provider.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e/tests/providers.rs b/e2e/tests/providers.rs index a964e0848..a56b6d766 100644 --- a/e2e/tests/providers.rs +++ b/e2e/tests/providers.rs @@ -797,7 +797,9 @@ async fn transactions_with_the_same_utxo() -> Result<()> { err, Error::Transaction(transaction::Reason::Validation(..)) )); - assert!(err.to_string().contains("already in cache")); + assert!(err + .to_string() + .contains("was submitted recently in a transaction ")); Ok(()) } diff --git a/packages/fuels-accounts/src/provider.rs b/packages/fuels-accounts/src/provider.rs index bc0345129..eea4cb2dd 100644 --- a/packages/fuels-accounts/src/provider.rs +++ b/packages/fuels-accounts/src/provider.rs @@ -274,7 +274,7 @@ impl Provider { CoinTypeId::Nonce(nonce) => format!("message with nonce: `{nonce}`"), }; Err(Error::Transaction(transaction::Reason::Validation( - format!("{msg} already in cache. Wallet address: `{addr}`, asset id: `{asset_id}`"), + format!("{msg} was submitted recently in a transaction - attempting to spend it again will result in an error. Wallet address: `{addr}`, asset id: `{asset_id}`"), ))) } else { Ok(())