Browse Source

#73 Add more console logs when eth tx sends fails.

pass-iguana-arg
Artem Pikulin 7 years ago
parent
commit
68c3a42eac
  1. 1
      iguana/exchanges/etomicswap/etomiccurl.c
  2. 2
      iguana/exchanges/etomicswap/etomiclib.cpp

1
iguana/exchanges/etomicswap/etomiccurl.c

@ -320,6 +320,7 @@ uint64_t getGasPriceFromStation(uint8_t defaultOnErr)
cJSON *resultJson = cJSON_Parse(s.ptr);
free(s.ptr);
if (resultJson == NULL) {
printf("Could not parse gas station response!\n");
return result;
}

2
iguana/exchanges/etomicswap/etomiclib.cpp

@ -676,6 +676,7 @@ char *sendEth(char *to, char *amount, char *privKey, uint8_t waitConfirm, int64_
} else {
tx.gasPrice = getGasPriceFromStation(defaultGasOnErr) * boost::multiprecision::pow(u256(10), 9);
if (tx.gasPrice == 0 && !defaultGasOnErr) {
printf("Could not get gas price from station!\n");
unlock_send_tx_mutex();
return NULL;
}
@ -764,6 +765,7 @@ char *sendErc20(
} else {
tx.gasPrice = getGasPriceFromStation(defaultGasOnErr) * boost::multiprecision::pow(u256(10), 9);
if (tx.gasPrice == 0 && !defaultGasOnErr) {
printf("Could not get gas price from station!\n");
unlock_send_tx_mutex();
return NULL;
}

Loading…
Cancel
Save