You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To facilitate the reuse of our SDK by external projects beyond wallets, we need to simplify the interconnection of objects:
Replace sendOperation.MakeOperation by directly using an expiration slot instead of the client and expiration delta (calculation to be done on the caller side).
This choice allows to:
Simplify the function signature (reduce the number of parameters)
Avoid unnecessarily carrying around a network client (if an operation is created on the caller side, a network client is already necessary at least to properly retrieve the chain ID)
Remove the func (n *NodeFetcher) MakeOperation and the unnecessary instantiation of a new network client
Remove a method from the interface func (n *NodeFetcher) MakeOperation
Modify operation.SendOperation by removing the chainID and deducing it directly from the network client.
This choice allows to:
Simplify the function signature (reduce the number of parameters)
Remove the unnecessary instantiation of a network client in GetChainID()
The text was updated successfully, but these errors were encountered:
sendOperation.MakeOperation is in the station repo, so we can create an issue there and after solving it we can update station-massa-wallet dependency to station and refactor:
Remove the func (n *NodeFetcher) MakeOperation and the unnecessary instantiation of a new network client
Remove a method from the interface func (n *NodeFetcher) MakeOperation
for "Modify operation.SendOperation" I see low benefit because in internal/handler/wallet/rolls.go we need the chain id for the prompt request, so we will keep the call to GetChainID. However we can do it, and benefit from this refacto:
Remove the unnecessary instantiation of a network client in GetChainID()
To facilitate the reuse of our SDK by external projects beyond wallets, we need to simplify the interconnection of objects:
Replace
sendOperation.MakeOperation
by directly using an expiration slot instead of the client and expiration delta (calculation to be done on the caller side).This choice allows to:
func (n *NodeFetcher) MakeOperation
and the unnecessary instantiation of a new network clientfunc (n *NodeFetcher) MakeOperation
Modify
operation.SendOperation
by removing the chainID and deducing it directly from the network client.This choice allows to:
GetChainID()
The text was updated successfully, but these errors were encountered: