diff --git a/package.json b/package.json index bce60592..c0c80d1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stellar/wallet-sdk", - "version": "0.1.0-rc.5", + "version": "0.1.0-rc.6", "description": "Libraries to help you write Stellar-enabled wallets in Javascript", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/transfers/DepositProvider.ts b/src/transfers/DepositProvider.ts index fe845b88..8b9d435d 100644 --- a/src/transfers/DepositProvider.ts +++ b/src/transfers/DepositProvider.ts @@ -141,7 +141,10 @@ export class DepositProvider extends TransferProvider { }); } - if (!response.ok) { + const isAnchorUSDSep6 = + !shouldUseNewEndpoints && this.transferServer.includes("anchorusd.com"); + + if (!response.ok && !isAnchorUSDSep6) { const responseText = await response.text(); try { const { error } = JSON.parse(responseText); diff --git a/src/transfers/WithdrawProvider.ts b/src/transfers/WithdrawProvider.ts index f4bbd7bf..727d192f 100644 --- a/src/transfers/WithdrawProvider.ts +++ b/src/transfers/WithdrawProvider.ts @@ -134,7 +134,10 @@ export class WithdrawProvider extends TransferProvider { }); } - if (!response.ok) { + const isAnchorUSDSep6 = + !shouldUseNewEndpoints && this.transferServer.includes("anchorusd.com"); + + if (!response.ok && !isAnchorUSDSep6) { const responseText = await response.text(); try { const { error } = JSON.parse(responseText);