Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
don't check for errors with AnchorUSD
Browse files Browse the repository at this point in the history
  • Loading branch information
morleyzhi committed Jul 16, 2020
1 parent f66d7b7 commit b224623
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 4 additions & 1 deletion src/transfers/DepositProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion src/transfers/WithdrawProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b224623

Please sign in to comment.