blockchain / service-my-wallet-v3

Blockchain Wallet API Service
https://blockchain.info/api/blockchain_wallet_api
GNU Affero General Public License v3.0
914 stars 520 forks source link

Error signing and pushing transaction - happens more and more #322

Open rumata2 opened 6 years ago

rumata2 commented 6 years ago

Service 2.0.0, Node v7.10.1 Hello,

We are using the Java API on Node.js gateway and recently more and more transactions fail with "Error signing and pushing transaction". It is a production system and this starts effecting our business. Could you please advise?

Here is the code excerpt we are using:

public String sendPayment(BtcPaymentDto payment) {
    String externalTrx = null;
    String errorMessage = null;
    checkBeanConfiguration();
    Map<String, Long> recipients = payment.getRecipients().entrySet().stream()
            .collect(Collectors.toMap(
                    e -> e.getKey(),
                    e -> toSatoshi(e.getValue()))
            );
    long amountInSatoshi = toSatoshi(payment.getFee());
    try {
        log.debug("Sending BTC payment: {}, {}, {}", recipients, payment.getSender(), amountInSatoshi);
        PaymentResponse response = wallet.sendMany(recipients, payment.getSender(), amountInSatoshi);
        externalTrx = response.getTxHash();
        return externalTrx;
    } catch (Exception e) {
        errorMessage = e.getMessage();
        throw new ServiceUnavailableException(ErrorReason.BLOCKCHAIN_INFO_ERROR, e);
    } finally {
        trxLogService.logBtcTransaction(payment, externalTrx, errorMessage);
    }
}

Thanks!

makarov20211221 commented 6 years ago

Hello dude, have u got the Api_code? Why I got no reply from the company....

rumata2 commented 6 years ago

Hey! Yes I do have the API code... This error had usually solved itself after a while... But it seems to persist lately.

makarov20211221 commented 6 years ago

Thx buddy. Hard to believe BlockChain's API is not stable ...

rlkanter commented 6 years ago

Anyone been able to get this working? I've been getting this error since yesterday afternoon.

shawnblue commented 6 years ago

Having the same issue for the last five days. Everything was working fine. Then five days ago every call to /payment returns {"error":"Error signing and pushing transaction"}

gojomo commented 6 years ago

In case it helps anyone else trying to decipher the mysterious "Error signing and pushing transaction" APIException error: it seems one way it can be triggered is by trying to send a very-small amount (like say a few hundred satoshis) to an address, perhaps below some Blockchain 'dust' limit.

surinder-insonix commented 6 years ago

Hi Dears, Having the same issue with payment api. http://localhost:3000/merchant/xxxxx/payment?password=xxxxx&to=12345XXXX&amount=100000 getting error : {"error":"Error signing and pushing transaction"} i am using testnet.blockchain.info with testnet network. Can anyone help to resolve this issue?

Thanks