stellar / freighter-backend

Freighter's indexer integration layer and general backend
1 stars 3 forks source link

[FEATURE] makes getIsToken spec return false if spec is not parseable #163

Closed aristidesstaffieri closed 3 weeks ago

aristidesstaffieri commented 4 weeks ago

What Makes getIsTokenSpec return false if it fails to parse the spec, because in this case it should be safe to assume that the contract is not a token.

Why getIsTokenSpec can be more strict about asserting if a contract is a sep41 implementation.

stellar-jenkins commented 4 weeks ago

Preview is available here:
http://freighter-backend-pr163.previews.kube001.services.stellar-ops.com/

aristidesstaffieri commented 4 weeks ago

@piyalbasu I had to split up the helpers into 2 new files (network & token) in order to be able to mock the internals for the new test with Jest. In es6 it can only mock if the internal is imported so when they are in the same file this becomes harder. I just re-export them from the root of that dir now to allow the exports across the app to not change.