File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,17 @@ const orderToTags = async order => {
12
12
const expiration =
13
13
Math . floor ( Date . now ( ) / 1000 ) +
14
14
parseInt ( process . env . ORDER_PUBLISHED_EXPIRATION_WINDOW ) ;
15
+ let fiat_amount = order . fiat_amount ;
16
+ if ( order . amount === 0 ) {
17
+ fiat_amount = `${ order . min_amount } -${ order . max_amount } ` ;
18
+ }
15
19
const tags = [ ] ;
16
20
tags . push ( [ 'd' , order . id ] ) ;
17
21
tags . push ( [ 'k' , order . type ] ) ;
18
22
tags . push ( [ 'f' , order . fiat_code ] ) ;
19
23
tags . push ( [ 's' , toKebabCase ( order . status ) ] ) ;
20
24
tags . push ( [ 'amt' , order . amount . toString ( ) ] ) ;
21
- tags . push ( [ 'fa' , order . fiat_amount . toString ( ) ] ) ;
25
+ tags . push ( [ 'fa' , fiat_amount . toString ( ) ] ) ;
22
26
tags . push ( [ 'pm' , order . payment_method ] ) ;
23
27
tags . push ( [ 'premium' , order . price_margin . toString ( ) ] ) ;
24
28
tags . push ( [ 'y' , 'lnp2pbot' ] ) ;
You can’t perform that action at this time.
0 commit comments