mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
multi: add AddActionReq MacaroonId helper func
Add helper method to `AddActionReq` returns the 4 byte macaroon ID that is derived from the MacaroonRootKeyID. Using the helper removes some code repetition at call sites, and makes the intended usage clearer.
This commit is contained in:
parent
01bc36ca41
commit
bd59605516
4 changed files with 15 additions and 13 deletions
|
|
@ -817,10 +817,7 @@ func (s *sessionRpcServer) ListActions(ctx context.Context,
|
|||
sessionID = id
|
||||
})
|
||||
|
||||
var macID [4]byte
|
||||
a.MacaroonRootKeyID.WhenSome(func(rootID uint64) {
|
||||
macID = session.IDFromMacRootKeyID(rootID)
|
||||
})
|
||||
macID := a.MacaroonId()
|
||||
|
||||
resp[i] = &litrpc.Action{
|
||||
SessionId: sessionID[:],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue