We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ee3063 commit 7e53875Copy full SHA for 7e53875
src/order.rs
@@ -256,6 +256,15 @@ impl Order {
256
257
/// Check if the sender is the creator of the order
258
pub fn sent_from_maker(&self, sender: PublicKey) -> Result<(), CantDoReason> {
259
+ let sender = sender.to_string();
260
+ if self.creator_pubkey != sender {
261
+ return Err(CantDoReason::InvalidPubkey);
262
+ }
263
+ Ok(())
264
265
+
266
+ /// Check if the sender is the creator of the order
267
+ pub fn not_sent_from_maker(&self, sender: PublicKey) -> Result<(), CantDoReason> {
268
let sender = sender.to_string();
269
if self.creator_pubkey == sender {
270
return Err(CantDoReason::InvalidPubkey);
0 commit comments