This repository was archived by the owner on May 24, 2024. It is now read-only.
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,8 @@ public void Sign(byte[] preimage)
111
111
/// </summary>
112
112
/// <param name="publicKey">The public key of the signer</param>
113
113
/// <param name="signature">The base64 value of the signature XDR</param>
114
- public void Sign ( string publicKey , string signature )
114
+ /// <param name="network">The network <see cref="Network"/> the transaction will be sent to.</param>
115
+ public void Sign ( string publicKey , string signature , Network network = null )
115
116
{
116
117
if ( publicKey == null )
117
118
throw new ArgumentNullException ( nameof ( publicKey ) , "public key cannot be null" ) ;
@@ -138,7 +139,7 @@ public void Sign(string publicKey, string signature)
138
139
throw new ArgumentException ( "Invalid public key" , nameof ( publicKey ) ) ;
139
140
}
140
141
141
- if ( ! keyPair . Verify ( Hash ( ) , signatureObj . InnerValue ) )
142
+ if ( ! keyPair . Verify ( Hash ( network ) , signatureObj . InnerValue ) )
142
143
throw new ArgumentException ( "Invalid signature" , nameof ( signature ) ) ;
143
144
144
145
var decoratedSignature = new DecoratedSignature
@@ -196,4 +197,4 @@ public string ToEnvelopeXdrBase64(TransactionXdrVersion version = TransactionXdr
196
197
}
197
198
198
199
}
199
- }
200
+ }
You can’t perform that action at this time.
0 commit comments