Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly build operations via Contract.call() #692

Merged
merged 2 commits into from
Sep 13, 2023
Merged

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Sep 13, 2023

The type of InvokeContractArgs.functionName is supposed to be a string now, not an ScSymbol like before.

This should have been caught by testing but they were being skipped with xit by mistake 🤦

@github-actions
Copy link

Size Change: -89 B (0%)

Total Size: 3.15 MB

Filename Size Change
dist/stellar-base.js 2.31 MB -62 B (0%)
dist/stellar-base.min.js 840 kB -27 B (0%)

compressed-size-action

@@ -59,7 +62,11 @@ describe('Contract', function () {
StellarBase.nativeToScVal(2, { type: 'i32' })
);

xit('builds valid XDR', function () {
it('works with no parameters', function () {
contract.call('empty').toXDR();
Copy link
Contributor

@sreuland sreuland Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not now, but would the toXDR() output need to be compared with expected output here and on builds valid XDR tests? or if it doesn't throw after serializing, that point is good enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah the structure itself is checked in other tests, this is just a "did you build working xdr" test (helps check types, etc. when it isn't marked to skip 🤦)

@Shaptic Shaptic merged commit a670f02 into master Sep 13, 2023
4 checks passed
@Shaptic Shaptic deleted the contract-call-fix branch September 13, 2023 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants