Commit eedcc53 1 parent d1a9f93 commit eedcc53 Copy full SHA for eedcc53
File tree 3 files changed +9
-5
lines changed
runtime/wasm/target/wasm32-unknown-unknown/release
xrml/xdex/spot/src/manager
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -560,9 +560,12 @@ where
560
560
if !handicap. lowest_offer . is_zero ( ) {
561
561
info. maximum_bid = handicap. lowest_offer + pair. fluctuation ( ) ;
562
562
}
563
- if ! handicap. highest_bid . is_zero ( ) {
563
+ if handicap. highest_bid > pair . fluctuation ( ) {
564
564
info. minimum_offer = handicap. highest_bid - pair. fluctuation ( ) ;
565
+ } else {
566
+ info. minimum_offer = 10_u64 . pow ( pair. tick_precision ) ; //tick
565
567
}
568
+
566
569
}
567
570
568
571
pairs. push ( info) ;
@@ -642,10 +645,11 @@ where
642
645
lowest_offer + pair. fluctuation ( )
643
646
} ;
644
647
645
- let minimum_offer = if highest_bid. is_zero ( ) {
646
- 0
647
- } else {
648
+ let minimum_offer = if highest_bid > pair. fluctuation ( ) {
648
649
highest_bid - pair. fluctuation ( )
650
+ } else {
651
+ 10_u64 . pow ( pair. tick_precision )
652
+
649
653
} ;
650
654
651
655
for price in ( lowest_offer..=maximum_bid) . step_by ( tick as usize ) {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ impl<T: Trait> Module<T> {
49
49
fluctuation
50
50
) ;
51
51
52
- if lowest_offer . is_zero ( ) {
52
+ if highest_bid . is_zero ( ) {
53
53
return Ok ( ( ) ) ;
54
54
}
55
55
You can’t perform that action at this time.
0 commit comments