Skip to content

Commit

Permalink
[ANCHOR-809][SEP-6] Fix /info test logic (#177)
Browse files Browse the repository at this point in the history
* fix /info test logic

* bump version
  • Loading branch information
JiahuiWho authored Nov 27, 2024
1 parent 3b00491 commit 9379fa7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 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.19",
"version": "0.6.20",
"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
10 changes: 4 additions & 6 deletions @stellar/anchor-tests/src/tests/sep6/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,11 @@ const requiredDepositFieldsMatchConfiguration: Test = {
const depositFieldKeys = Object.keys(
config.sepConfig["6"].deposit.transactionFields,
);
for (const configuredKey of depositFieldKeys) {
if (
!this.context.expects.sep6DepositFieldsRequired.includes(configuredKey)
) {
for (const requiredKey of this.context.expects.sep6DepositFieldsRequired) {
if (depositFieldKeys.includes(requiredKey)) {
result.failure = makeFailure(this.failureModes.FIELD_NOT_FOUND);
result.expected = configuredKey;
result.actual = this.context.expects.sep6DepositFieldsRequired;
result.expected = requiredKey;
result.actual = depositFieldKeys;
return result;
}
}
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.19"
"@stellar/anchor-tests": "0.6.20"
}
}

0 comments on commit 9379fa7

Please sign in to comment.