microstellar icon indicating copy to clipboard operation
microstellar copied to clipboard

allow multiple source accounts for payment operations

Open nikhilsaraf opened this issue 7 years ago • 1 comments

Always add the SourceAccount to the paymentMuts so we can submit a transaction that includes operations from different source accounts (this is different from the multisig use-case outlined in the readme).

Sample Usage:

ms.Start(a.Address, microstellar.Opts().WithSigner(a.Seed).WithSigner(b.Seed))
ms.PayNative(a.Address, receiver1.Address, "1.0")
ms.PayNative(b.Address, receiver2.Address, "1.0")
err := ms.Submit()

Always including the source account in the paymentMuts is safe even if the source account matches the transaction's source account. This should ideally be done for all operations in microstellar, but it would be great if you could include this PR for now.

nikhilsaraf avatar Jul 27 '18 15:07 nikhilsaraf

Thanks for the change, however it looks like it breaks some tests.

Also, can you please add an additional test to cover this case.

0xfe avatar Jul 27 '18 15:07 0xfe