feat(opencode): bring back Kind.Tip on OpenCodePayload#1114
Merged
Conversation
Ports the legacy CodePayload tip layout onto OpenCodePayload. The payload value becomes polymorphic (PayloadValue): Cash/MultiMintCash carry a Fiat as before, Tip carries a Username. Fiat now implements PayloadValue, so existing call sites are unaffected and the Cash/MultiMintCash wire format is unchanged. Tip encoding follows the shipped legacy scheme: the username is written at OFFSET_USERNAME and short usernames are padded with '.' + base64(SHA256(username)) out to 15 bytes; decode recovers the username by stripping at the '.' delimiter. GrabBillTransactor rejects Tip as non-grabbable; CodeScanDelegate routes Tip off the cash path (tip-scan handling is a follow-up). Covered by OpenCodePayloadTests tip round-trips. Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
…geCoordinator RealSessionController gained a blobStorageCoordinator constructor param (#1111) but these two direct-construction tests were not updated, leaving the session unit-test source uncompilable on trunk. Pass a relaxed mock like the other coordinators. Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings back
Kind.Tipfrom the legacyCodePayloadand applies it toOpenCodePayload.OpenCodePayload.valuebecomes polymorphic via a newPayloadValueinterface: Cash/MultiMintCash carry aFiat(unchanged), Tip carries aUsername.FiatimplementsPayloadValue, so existing call sites and the Cash/MultiMintCash wire format are unchanged — Tip is purely additive.OFFSET_USERNAME, short usernames padded with"." + base64(SHA256(username))to 15 bytes; decode strips at the.delimiter.GrabBillTransactorrejects Tip as non-grabbable;CodeScanDelegateroutes Tip off the cash path (it force-unwraps.fiat). Actual tip-scan routing to a tip flow is a follow-up (TODO(tipping)).android.util.Base64/SHA256).