-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtradingRules_buyerAsMaker.mjs
94 lines (89 loc) · 2.95 KB
/
tradingRules_buyerAsMaker.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
* This module exports an array of trading-related rule objects.
*
* @see {@link ./rules.mjs} for the definition of Rule.
* @type {Rule[]}
*/
export const tradingRules = [
/*
// For debugging only
{
eventName: 'BuyerAsMakerTrade',
logger: 'b.c.t.m.b.Trade',
pattern: 'BuyerAsMakerTrade',
message: '{*}',
level: 'debug',
sendToTelegram: false,
isActive: true,
},
*/
/**
* Step 1. Phase DEPOSIT_PAID
*/
{
eventName: 'BuyerAsMakerTrade_BUYER_RECEIVED_DEPOSIT_TX_PUBLISHED_MSG',
logger: 'b.c.t.m.b.Trade',
pattern: 'Set new state at BuyerAsMakerTrade (id={0}): BUYER_RECEIVED_DEPOSIT_TX_PUBLISHED_MSG',
message: '({0}) Deposit transaction has been published. Wait for blockchain confirmation!',
level: 'notice',
sendToTelegram: true,
},
{
eventName: 'BuyerAsMakerTrade_BUYER_SAW_DEPOSIT_TX_IN_NETWORK',
logger: 'b.c.t.m.b.Trade',
pattern: 'Set new state at BuyerAsMakerTrade (id={0}): BUYER_SAW_DEPOSIT_TX_IN_NETWORK',
message: '({0}) Deposit transaction has been published. Wait for blockchain confirmation!',
level: 'notice',
sendToTelegram: true,
},
/**
* Step 2. Phase DEPOSIT_CONFIRMED
*/
{
eventName: 'BuyerAsMakerTrade_DEPOSIT_CONFIRMED_IN_BLOCK_CHAIN',
logger: 'b.c.t.m.b.Trade',
pattern: 'Set new state at BuyerAsMakerTrade (id={0}): DEPOSIT_CONFIRMED_IN_BLOCK_CHAIN',
message: '({0}) Deposit transaction is confirmed. Open your Bisq application and start the payment!',
level: 'notice',
sendToTelegram: true,
},
/**
* Step 3. Phase FIAT_PAYMENT_INITIATED
*/
{
eventName: 'BuyerAsMakerTrade_BUYER_STORED_IN_MAILBOX_FIAT_PAYMENT_INITIATED_MSG',
logger: 'b.c.t.m.b.Trade',
pattern: 'Set new state at BuyerAsMakerTrade (id={0}): BUYER_STORED_IN_MAILBOX_FIAT_PAYMENT_INITIATED_MSG',
message: '({0}) You confirmed fiat payment has started. Wait until payment has arrived!',
level: 'notice',
sendToTelegram: true,
isActive: false,
},
{
eventName: 'BuyerAsMakerTrade_BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG',
logger: 'b.c.t.m.b.Trade',
pattern: 'Set new state at BuyerAsMakerTrade (id={0}): BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG',
message: '({0}) You confirmed fiat payment has started. Wait until payment has arrived!',
level: 'notice',
sendToTelegram: true,
},
/**
* Step 4. Phase PAYOUT_TX_PUBLISHED
*/
{
eventName: 'BuyerAsMakerTrade_BUYER_RECEIVED_PAYOUT_TX_PUBLISHED_MSG',
logger: 'b.c.t.m.b.Trade',
pattern: 'Set new state at BuyerAsMakerTrade (id={0}): BUYER_RECEIVED_PAYOUT_TX_PUBLISHED_MSG',
message: '({0}) The trade is completed',
level: 'notice',
sendToTelegram: true,
},
{
eventName: 'BuyerAsMakerTrade_BUYER_SAW_PAYOUT_TX_IN_NETWORK',
logger: 'b.c.t.m.b.Trade',
pattern: 'Set new state at BuyerAsMakerTrade (id={0}): BUYER_SAW_PAYOUT_TX_IN_NETWORK',
message: '({0}) The trade is completed',
level: 'notice',
sendToTelegram: true,
},
]