Implement Push Publisher#27
Conversation
6bb1692 to
5715a0c
Compare
9f6ec41 to
6bb1692
Compare
|
/rebase-autosquash |
6bb1692 to
97e8c80
Compare
thehobbit85
left a comment
There was a problem hiding this comment.
I thought we agreed that the ActionEffect type is going to be:
{
type,
completed,
program
}
Instead of spreading all the props no?
During the call, I thought we are going to use Sam's front-end implementation of ActionEffects? He also sent the code snippet for the type here: https://edgesecure.slack.com/archives/C03PG9LVDM3/p1657832756200729 |
|
I have switched this branch from |
| export interface SeqActionEffect extends GeneralActionEffect { | ||
| type: 'seq' | ||
| opIndex: number | ||
| childEffect: ActionEffect | ||
| } | ||
|
|
||
| export interface ParActionEffect extends GeneralActionEffect { | ||
| type: 'par' | ||
| childEffects: ActionEffect[] | ||
| } | ||
|
|
||
| export interface BalanceActionEffect extends GeneralActionEffect { | ||
| type: 'balance' | ||
| address: string | ||
| aboveAmount?: string | ||
| belowAmount?: string | ||
| walletId: string | ||
| tokenId?: string | ||
| } | ||
|
|
||
| export interface TxConfsActionEffect extends GeneralActionEffect { | ||
| type: 'tx-confs' | ||
| txId: string | ||
| walletId: string | ||
| confirmations: number | ||
| } |
There was a problem hiding this comment.
These are client-side types, not server types. I talked to Sam about this, and we agreed that the client needs to "bake" these down a bit more before sending them to the server.
For instance, walletId is useless to the server, since the server cannot access customer wallets. Instead, the client needs to extract a single network address for the server to check. Likewise, par and seq are something the client worries about as it executes the program. Once the client figures out what the next steps are, it uploads them to the server, so the server doesn't need to know how they are linked.
Nevertheless, I think we can go ahead and merge this now and fix it later - I don't want to slow down the project, and something is better than nothing.
0822833 to
5d964f5
Compare
Uh oh!
There was an error while loading. Please reload this page.