forked from stellar/system-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support latest soroban-examples
The system-test started failing in stellar/stellar-cli#1500 because it finally updated the version of `soroban-examples` to use a version that includes stellar/soroban-examples#314. The previous `invoke.ts` logic assumed that the variable would be a Symbol, but the variable has been changed to a String. I don't want to break every project that still uses `system-test` with a stale `soroban-examples` hash, so here's what I did: - dynamically define `contract` using `import()`, using a `@ts-ignore` directive because this can error if `stellar-sdk` doesn't include a `contract` export. - if `contract` is there, then we don't need to know the type of the argument. It could be a Symbol or a String or anything else. - non-`contract` logic path stays unchanged, assuming `Symbol`
- Loading branch information
Showing
2 changed files
with
67 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters