Skip to content

Commit

Permalink
Fix signers IInteroperable.ToStackItem (neo-project#3221)
Browse files Browse the repository at this point in the history
* Fix signers

* roma's feedback

---------

Co-authored-by: NGD Admin <[email protected]>
  • Loading branch information
shargon and NGDAdmin authored May 10, 2024
1 parent 1e6404b commit d713d2b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Neo/Network/P2P/Payloads/Signer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ void IInteroperable.FromStackItem(VM.Types.StackItem stackItem)

VM.Types.StackItem IInteroperable.ToStackItem(ReferenceCounter referenceCounter)
{
return new VM.Types.Array(referenceCounter, new VM.Types.StackItem[]
{
return new VM.Types.Array(referenceCounter,
[
Account.ToArray(),
(byte)Scopes,
new VM.Types.Array(referenceCounter, AllowedContracts.Select(u => new VM.Types.ByteString(u.ToArray()))),
new VM.Types.Array(referenceCounter, AllowedGroups.Select(u => new VM.Types.ByteString(u.ToArray()))),
new VM.Types.Array(referenceCounter, Rules.Select(u => u.ToStackItem(referenceCounter)))
});
Scopes.HasFlag(WitnessScope.CustomContracts) ? new VM.Types.Array(referenceCounter, AllowedContracts.Select(u => new VM.Types.ByteString(u.ToArray()))) : new VM.Types.Array(referenceCounter),
Scopes.HasFlag(WitnessScope.CustomGroups) ? new VM.Types.Array(referenceCounter, AllowedGroups.Select(u => new VM.Types.ByteString(u.ToArray()))) : new VM.Types.Array(referenceCounter),
Scopes.HasFlag(WitnessScope.WitnessRules) ? new VM.Types.Array(referenceCounter, Rules.Select(u => u.ToStackItem(referenceCounter))) : new VM.Types.Array(referenceCounter)
]);
}
}
}

0 comments on commit d713d2b

Please sign in to comment.