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

feat: sponsored sbtc txns #6012

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

alexp3y
Copy link
Contributor

@alexp3y alexp3y commented Dec 15, 2024

Try out Leather build dc94e36Extension build, Test report, Storybook, Chromatic

@fbwoolf @kyranjamie @markmhendrickson Ready for review. Covers sponsorships for both contract calls and swaps. Need to change API URL config once in place. Will update shortly once updated testing APIs are online.

@fbwoolf I removed the swap sponsorship condition checks from here (other than feature flag enabled) to rely solely on the API verification rules (gives us a bit more flexibility in updating sponsorship rules).

src/app/query/sbtc/sponsored-transactions.ts Outdated Show resolved Hide resolved
Comment on lines 20 to 23
interface SbtcSponsorshipVerificationResult {
isVerifying: boolean;
result: SbtcSponsorshipEligibility | undefined;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this be discriminating union to help types when consuming?

Suggested change
interface SbtcSponsorshipVerificationResult {
isVerifying: boolean;
result: SbtcSponsorshipEligibility | undefined;
}
interface SbtcSponsorshipVerificationResultPending {
isVerifying: false;
}
interface SbtcSponsorshipVerificationResultVerified {
isVerifying: true;
result: SbtcSponsorshipEligibility;
}
type SbtcSponsorshipVerificationResult = SbtcSponsorshipVerificationResultPending | SbtcSponsorshipVerificationResultVerified;

@alexp3y alexp3y force-pushed the feat/sbtc-sponsored-txns branch from 1f4b1a0 to 745684f Compare December 16, 2024 23:14
@alexp3y alexp3y changed the base branch from dev to feat/display-sbtc December 16, 2024 23:18
@alexp3y alexp3y force-pushed the feat/sbtc-sponsored-txns branch from 745684f to 618ec36 Compare December 17, 2024 13:49
@alexp3y alexp3y marked this pull request as ready for review December 17, 2024 14:01
@markmhendrickson
Copy link
Collaborator

@alexp3y is this testable with regular testnet?

@alexp3y
Copy link
Contributor Author

alexp3y commented Dec 17, 2024

@markmhendrickson If you bridged testnet sbtc, txs from that address should work. The current testnet API doesn't have whitelisted contract support, but any sbtc swaps / sbtc post-condition txs would work in theory. Will try to set up a separate test API now that works around not having testnet sbtc.

@markmhendrickson
Copy link
Collaborator

markmhendrickson commented Dec 17, 2024

Presumably I should see sBTC in the list to test sponsored swaps?

Screenshot 2024-12-17 at 15 39 13

@markmhendrickson
Copy link
Collaborator

I'm not seeing the enrollment transaction sponsored during testing on testnet:

image image

@markmhendrickson
Copy link
Collaborator

Swaps need testing on mainnet, and testnet API will get updated to allowlist enroll transaction for further testing

@fbwoolf fbwoolf force-pushed the feat/display-sbtc branch 3 times, most recently from 85c4e68 to 7229768 Compare December 17, 2024 17:52
@alexp3y alexp3y force-pushed the feat/sbtc-sponsored-txns branch 2 times, most recently from 298b9e3 to 59b905c Compare December 17, 2024 19:14
@fbwoolf fbwoolf force-pushed the feat/display-sbtc branch 2 times, most recently from bbabe49 to c4c0b7a Compare December 17, 2024 19:31
@fbwoolf fbwoolf force-pushed the feat/sbtc-sponsored-txns branch from 59b905c to 625b03d Compare December 17, 2024 21:06
@fbwoolf
Copy link
Contributor

fbwoolf commented Dec 17, 2024

Found a small formatting bug created. I am pushing up a fix commit for now...

Screenshot 2024-12-17 at 4 34 02 PM

@fbwoolf fbwoolf force-pushed the feat/sbtc-sponsored-txns branch from a9adf16 to 31439ed Compare December 18, 2024 00:01
@fbwoolf
Copy link
Contributor

fbwoolf commented Dec 18, 2024

@alexp3y I rebased this into one commit, but I didn't realize that would remove you as a contributor. Can you review the code and make a small commit change before I merge this into the feature branch? You can squash everything into a commit you make and push up?

@alexp3y alexp3y force-pushed the feat/sbtc-sponsored-txns branch from 31439ed to 945207c Compare December 18, 2024 08:08
@alexp3y alexp3y force-pushed the feat/sbtc-sponsored-txns branch from 945207c to dc94e36 Compare December 18, 2024 09:36
@alexp3y alexp3y merged commit 6d1f772 into feat/display-sbtc Dec 18, 2024
19 checks passed
@alexp3y alexp3y deleted the feat/sbtc-sponsored-txns branch December 18, 2024 11:19
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.

4 participants