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

ts: make Provider an interface and update provider functions #1707

Conversation

@paul-schaaf paul-schaaf linked an issue Mar 29, 2022 that may be closed by this pull request
@paul-schaaf paul-schaaf changed the title initial Provider interface ts: make Provider an interface and update provider functions Mar 29, 2022
ts/src/provider.ts Outdated Show resolved Hide resolved
@paul-schaaf paul-schaaf changed the base branch from 411-ts-use-provider-interface-instead-of-class to master March 31, 2022 01:16
@paul-schaaf paul-schaaf marked this pull request as draft March 31, 2022 04:40
@paul-schaaf paul-schaaf marked this pull request as ready for review March 31, 2022 18:38
@paul-schaaf paul-schaaf marked this pull request as draft March 31, 2022 18:44
@paul-schaaf
Copy link
Contributor Author

Turning this into a draft so we dont accidentally merge it. It is ready for review though

ts/src/provider.ts Outdated Show resolved Hide resolved

if (transaction.nonceInfo && signers) {
if (wallet) {
transaction = await wallet.signTransaction(transaction);
Copy link
Member

Choose a reason for hiding this comment

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

We should remove the wallet parameter and force the caller to sign prior to passing in the tx.

Copy link
Contributor Author

@paul-schaaf paul-schaaf Apr 11, 2022

Choose a reason for hiding this comment

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

I remember why I did it this way now. simulateTransaction has all this logic to efficiently get the blockhash and that has to be done before the first signature.

Copy link
Member

@armaniferrante armaniferrante left a comment

Choose a reason for hiding this comment

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

Let's make the simulate changes and merge this!

CHANGELOG.md Outdated Show resolved Hide resolved
@paul-schaaf paul-schaaf marked this pull request as ready for review April 11, 2022 19:48
@paul-schaaf paul-schaaf merged commit 537d470 into coral-xyz:master Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ts: Use Provider interface instead of class
2 participants