Skip to content
This repository was archived by the owner on Jul 21, 2020. It is now read-only.

[WIP] feat(participant): allow method interception#30

Open
ProbablePrime wants to merge 1 commit intomasterfrom
feat/intercept
Open

[WIP] feat(participant): allow method interception#30
ProbablePrime wants to merge 1 commit intomasterfrom
feat/intercept

Conversation

@ProbablePrime
Copy link
Contributor

This allows us to intercept normally transparent communication on the participant side. It also caches button costs in the same way kind was cached for GA.

Planned psudocode for front-end.

participant.intercept('giveInput', params => {
 if(!allowlist) {
	 const cost = getCost(malm);
	 if(cost > 0) {
       // Confirm DO YOU WANT TO PAY
		return confirm...
     }
 }
return promise.resolve(true);
})

Builds failing because its not done, but just looking for a general review before I go much further.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant