Skip to content

Commit

Permalink
Fix stellar:native asset SEP-38 info validation (#115)
Browse files Browse the repository at this point in the history
* Fix stellar:native asset SEP-38 info

* Bump version
  • Loading branch information
philipliu authored Jun 15, 2023
1 parent 8a4bef5 commit 2c87ef7
Show file tree
Hide file tree
Showing 3 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.5.9",
"version": "0.5.10",
"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
6 changes: 4 additions & 2 deletions @stellar/anchor-tests/src/tests/sep38/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ export const hasValidInfoSchema: Test = {
const failure = makeFailure(this.failureModes.INVALID_ASSET_VALUE, {
asset: asset.asset,
});
if (parts.length !== 3 && asset !== "stellar:native") {
if (parts.length !== 3 && asset.asset !== "stellar:native") {
result.failure = failure;
return result;
}
try {
Keypair.fromPublicKey(parts[2]);
if (asset.asset !== "stellar:native") {
Keypair.fromPublicKey(parts[2]);
}
} catch {
result.failure = failure;
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.5.9"
"@stellar/anchor-tests": "0.5.10"
}
}

0 comments on commit 2c87ef7

Please sign in to comment.