summaryrefslogtreecommitdiff
path: root/src/testing/test_merchant_order_creation.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/test_merchant_order_creation.sh')
-rwxr-xr-xsrc/testing/test_merchant_order_creation.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testing/test_merchant_order_creation.sh b/src/testing/test_merchant_order_creation.sh
index fdf01d1d..cf029714 100755
--- a/src/testing/test_merchant_order_creation.sh
+++ b/src/testing/test_merchant_order_creation.sh
@@ -247,7 +247,7 @@ echo "OK"
STATUS=$(curl 'http://localhost:9966/instances/default/private/products' \
- -d '{"product_id":"1","description":"product with id 1 and price :15","price":"USD:15","total_stock":1,"description_i18n":{},"unit":"","image":"","taxes":[],"address":{},"next_restock":{"t_ms":"never"}}' \
+ -d '{"product_id":"1","description":"product with id 1 and price :15","price":"USD:15","total_stock":1,"description_i18n":{},"unit":"","image":"","taxes":[],"address":{},"next_restock":{"t_s":"never"}}' \
-w "%{http_code}" -s -o /dev/null)
if [ "$STATUS" != "400" ]
@@ -315,12 +315,12 @@ fi
# WIRE TRANSFER TO MERCHANT AND NOTIFY BACKEND
#
-PAY_DEADLINE=`jq -r .contract_terms.pay_deadline.t_ms < $LAST_RESPONSE`
-WIRE_DEADLINE=`jq -r .contract_terms.wire_transfer_deadline.t_ms < $LAST_RESPONSE`
+PAY_DEADLINE=`jq -r .contract_terms.pay_deadline.t_s < $LAST_RESPONSE`
+WIRE_DEADLINE=`jq -r .contract_terms.wire_transfer_deadline.t_s < $LAST_RESPONSE`
NOW=`date +%s`
-TO_SLEEP=`echo $(( ($WIRE_DEADLINE /1000) - $NOW ))`
+TO_SLEEP=`echo $(( $WIRE_DEADLINE - $NOW ))`
echo waiting $TO_SLEEP secs for wire transfer
echo -n "Perform wire transfers ..."