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

fix(content/KeyAutoAdd): get output of any step, not just of previous #640

Merged
merged 6 commits into from
Oct 3, 2024

Conversation

sidvishnoi
Copy link
Member

Simplifies KeyAutoAdd's step runner to let us get output of any step (that has been previously run), not just result of previous. Getting result of previous had limitation that any intermediate steps had to pass through data from previous steps. Now we store outputs in a Map and get those with the output(fn) helper (WeakMap not needed, as we store reference to function anyway in steps array).

Also update signature of StepRun function.

Additionally, turn skip call to throw an instance of SkipError instead of object with symbol.

@github-actions github-actions bot added the area: content Improvements or additions to extension content script label Oct 3, 2024
Copy link

github-actions bot commented Oct 3, 2024

Extension builds preview

Name Link
Latest commit 4f01b7c
Latest job logs Run #11161797214
BadgeDownload
BadgeDownload

Copy link
Member Author

@sidvishnoi sidvishnoi left a comment

Choose a reason for hiding this comment

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

test-e2e

src/content/keyAutoAdd/lib/keyAutoAdd.ts Show resolved Hide resolved
src/content/keyAutoAdd/lib/keyAutoAdd.ts Show resolved Hide resolved
src/content/keyAutoAdd/lib/keyAutoAdd.ts Show resolved Hide resolved
src/content/keyAutoAdd/lib/types.ts Outdated Show resolved Hide resolved
src/content/keyAutoAdd/testWallet.ts Show resolved Hide resolved
Copy link
Member

@raducristianpopa raducristianpopa left a comment

Choose a reason for hiding this comment

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

A small additional comment: I would suggest adding the base URLs in environment variables. It would be easier to update them when the Test Wallet is going to move to the new domain.

src/content/keyAutoAdd/lib/keyAutoAdd.ts Show resolved Hide resolved
src/content/keyAutoAdd/testWallet.ts Show resolved Hide resolved
@sidvishnoi
Copy link
Member Author

I would suggest adding the base URLs in environment variables. It would be easier to update them when the Test Wallet is going to move to the new domain.

I thought of doing that, until I found there's api.rafiki.money too, then thought hard-coding is fine. Might revisit as I work on Fynbos one.

@sidvishnoi sidvishnoi merged commit 1fe9de1 into main Oct 3, 2024
9 checks passed
@sidvishnoi sidvishnoi deleted the keyAutoAdd-improvements branch October 3, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: content Improvements or additions to extension content script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants