Skip to content

Commit

Permalink
SEP-6: Support async deposit info (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipliu authored Nov 2, 2023
1 parent 72452c1 commit 2215158
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 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.7",
"version": "0.6.8",
"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
7 changes: 1 addition & 6 deletions @stellar/anchor-tests/src/schemas/sep6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,7 @@ export const transactionsSchema = {
export function getTransactionSchema(isDeposit: boolean) {
const schema = JSON.parse(JSON.stringify(transactionSchema));
const requiredDepositParams = ["to"];
const requiredWithdrawParams = [
"from",
"withdraw_memo",
"withdraw_memo_type",
"withdraw_anchor_account",
];
const requiredWithdrawParams = ["from"];

const depositProperties = {
deposit_memo: {
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 @@ -446,7 +446,9 @@ export const returnsProperSchemaForKnownAccounts: Test = {
memoValue = Buffer.from(responseBody.memo, "base64");
}
try {
new Memo(responseBody.memo_type, memoValue);
if (memoValue) {
new Memo(responseBody.memo_type, memoValue);
}
} catch {
result.failure = makeFailure(this.failureModes.INVALID_SCHEMA, {
errors: "invalid 'memo' for 'memo_type'",
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.7"
"@stellar/anchor-tests": "0.6.8"
}
}

0 comments on commit 2215158

Please sign in to comment.