@@ -55,6 +55,27 @@ func (sr *SignatureRequest) MessageToSign() []byte {
5555 return sr .Request
5656}
5757
58+ type collectEndorsementsView struct {
59+ tx * Transaction
60+ Opts * EndorsementsOpts
61+ sessions map [string ]view.Session
62+ }
63+
64+ func (c * collectEndorsementsView ) Call (context view.Context ) (interface {}, error ) {
65+ return context .RunView (& CollectEndorsementsView {
66+ tx : c .tx ,
67+ Opts : c .Opts ,
68+ sessions : c .sessions ,
69+ metrics : GetMetrics (context ),
70+ sigService : driver .GetSigService (context ),
71+ identityProvider : driver .GetIdentityProvider (context ),
72+ endpointService : view2 .NewEndpointService (driver .GetEndpointService (context )),
73+ auditingViewInitiator : AuditingViewInitiatorFactory {viewRegistry : view2 .GetRegistry (context )},
74+ networkProvider : network .GetProvider (context ),
75+ ttxManager : utils .MustGet (context .GetService (& Manager {})).(* Manager ),
76+ })
77+ }
78+
5879type CollectEndorsementsView struct {
5980 tx * Transaction
6081 Opts * EndorsementsOpts
@@ -77,12 +98,12 @@ type CollectEndorsementsView struct {
7798// 3. Before completing, all recipients receive the approved transaction.
7899// Depending on the token driver implementation, the recipient's signature might or might not be needed to make
79100// the token transaction valid.
80- func NewCollectEndorsementsView (tx * Transaction , opts ... EndorsementsOpt ) * CollectEndorsementsView {
101+ func NewCollectEndorsementsView (tx * Transaction , opts ... EndorsementsOpt ) * collectEndorsementsView {
81102 options , err := CompileCollectEndorsementsOpts (opts ... )
82103 if err != nil {
83104 panic (err )
84105 }
85- return & CollectEndorsementsView {tx : tx , Opts : options , sessions : map [string ]view.Session {}}
106+ return & collectEndorsementsView {tx : tx , Opts : options , sessions : map [string ]view.Session {}}
86107}
87108
88109// Call executes the view.
0 commit comments