diff --git a/src/api/marketplace/orders/tasks.py b/src/api/marketplace/orders/tasks.py index fe9358b9..ecbedd9f 100644 --- a/src/api/marketplace/orders/tasks.py +++ b/src/api/marketplace/orders/tasks.py @@ -136,6 +136,9 @@ def confirm_escrow(order_id: str): val_auth_keypair, _ = get_local_keypair_pubkey(path=VALIDATOR_KEY_PATH) + if escrow.status == 'cancelled' or escrow.status == 'delivered': + return False + on_chain_transaction = OnChainTransaction.objects.create( escrow=escrow, transaction_type='confirm_escrow' ) @@ -175,7 +178,7 @@ def confirm_escrow(order_id: str): on_chain_transaction.save() - if on_chain_transaction.is_confirmed: + if on_chain_transaction.is_confirmed and order.status != 'completed': order.status = 'completed' order.save() diff --git a/src/ui/src/store.ts b/src/ui/src/store.ts index d14d9d5c..93e62187 100644 --- a/src/ui/src/store.ts +++ b/src/ui/src/store.ts @@ -17,7 +17,6 @@ const userPersistConfig = { storage: storage, whitelist: ["user"], blacklist: ["navigation"], - timeout: 1000, }; const cartPersistConfig = { @@ -25,7 +24,6 @@ const cartPersistConfig = { storage: storage, whitelist: ["cart"], blacklist: ["navigation"], - timeout: 1000, }; const persistedUserReducer = persistReducer(