bitcoin-sv / ts-sdk

Other
51 stars 13 forks source link

Improve JSON content type detection #80

Closed oskarszoon closed 5 months ago

oskarszoon commented 5 months ago

Responses from latest version of ARC weren't parsed properly because their returned content-type header is application/json; charset=UTF-8 and ts-sdk was only checking for === 'application/json'

This resulted in an incorrect return value for tx.broadcast() when using the default broadcaster:

{ status: 'success', txid: undefined, message: 'undefined undefined' }