Skip to content

Commit

Permalink
SEP-6: Make account_id optional in withdraw response (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipliu authored Nov 2, 2023
1 parent 2215158 commit 40f044e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion @stellar/anchor-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stellar/anchor-tests",
"version": "0.6.8",
"version": "0.6.9",
"description": "stellar-anchor-tests is a library and command line interface for testing Stellar anchors.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion @stellar/anchor-tests/src/schemas/sep6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const withdrawSuccessResponseSchema = {
type: "object",
},
},
required: ["account_id", "id"],
required: ["id"],
additionalProperties: false,
};

Expand Down
4 changes: 3 additions & 1 deletion @stellar/anchor-tests/src/tests/sep6/withdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ export const returnsProperSchemaForKnownAccounts: Test = {
this.context.provides.sep6WithdrawTransactionId = responseBody.id || null;
if (getWithdrawCall.response.status === 200) {
try {
Keypair.fromPublicKey(responseBody.account_id);
if (responseBody.account_id) {
Keypair.fromPublicKey(responseBody.account_id);
}
} catch {
result.failure = makeFailure(this.failureModes.INVALID_SCHEMA, {
errors: "invalid Stellar public key",
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"winston": "^3.3.3"
},
"peerDependencies": {
"@stellar/anchor-tests": "0.6.8"
"@stellar/anchor-tests": "0.6.9"
}
}

0 comments on commit 40f044e

Please sign in to comment.