Skip to content

Commit a96d93d

Browse files
committed
user-management: Add IRT currency
1 parent 1dacf2b commit a96d93d

5 files changed

Lines changed: 33 additions & 22 deletions

File tree

  • accountant/accountant-ports/accountant-persister-postgres/src/main/resources
  • api/api-ports/api-persister-postgres/src/main/resources
  • bc-gateway/bc-gateway-ports/bc-gateway-persister-postgres/src/main/resources
  • matching-engine/matching-engine-app/src/main/resources
  • wallet/wallet-ports/wallet-persister-postgres/src/main/resources

accountant/accountant-ports/accountant-persister-postgres/src/main/resources/data.sql

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
INSERT INTO pair_config
22
VALUES ('btc_usdt', 'btc', 'usdt', 0.000001, 0.01, 55000),
33
('eth_usdt', 'eth', 'usdt', 0.00001, 0.01, 3800),
4+
('btc_irt', 'btc', 'irt', 0.000001, 0.01, 55000),
5+
('eth_irt', 'eth', 'irt', 0.00001, 0.01, 3800),
46
('nln_usdt', 'nln', 'usdt', 1.0, 0.01, 0.01),
57
('nln_btc', 'nln', 'btc', 1.0, 0.000001, 1 / 5500000),
68
('nln_eth', 'nln', 'eth', 1.0, 0.000001, 1 / 550000)
@@ -25,21 +27,25 @@ VALUES (1, 'btc_usdt', 'ASK', '*', 0.01, 0.01),
2527
(7, 'eth_usdt', 'ASK', '*', 0.01, 0.01),
2628
(8, 'eth_usdt', 'BID', '*', 0.01, 0.01),
2729
(9, 'nln_eth', 'ASK', '*', 0.01, 0.01),
28-
(10, 'nln_eth', 'BID', '*', 0.01, 0.01)
30+
(10, 'nln_eth', 'BID', '*', 0.01, 0.01),
31+
(11, 'btc_irt', 'ASK', '*', 0.01, 0.01),
32+
(12, 'btc_irt', 'BID', '*', 0.01, 0.01),
33+
(13, 'eth_irt', 'ASK', '*', 0.01, 0.01),
34+
(14, 'eth_irt', 'BID', '*', 0.01, 0.01)
2935
ON CONFLICT DO NOTHING;
3036

3137
-- Test pair configs
3238
INSERT INTO pair_fee_config
33-
VALUES (11, 'tbtc_tusdt', 'ASK', '*', 0.01, 0.01),
34-
(12, 'tbtc_tusdt', 'BID', '*', 0.01, 0.01),
35-
(13, 'nln_tusdt', 'ASK', '*', 0.01, 0.01),
36-
(14, 'nln_tusdt', 'BID', '*', 0.01, 0.01),
37-
(15, 'nln_tbtc', 'ASK', '*', 0.01, 0.01),
38-
(16, 'nln_tbtc', 'BID', '*', 0.01, 0.01),
39-
(17, 'teth_tusdt', 'ASK', '*', 0.01, 0.01),
40-
(18, 'teth_tusdt', 'BID', '*', 0.01, 0.01),
41-
(19, 'nln_teth', 'ASK', '*', 0.01, 0.01),
42-
(20, 'nln_teth', 'BID', '*', 0.01, 0.01)
39+
VALUES (15, 'tbtc_tusdt', 'ASK', '*', 0.01, 0.01),
40+
(16, 'tbtc_tusdt', 'BID', '*', 0.01, 0.01),
41+
(17, 'nln_tusdt', 'ASK', '*', 0.01, 0.01),
42+
(18, 'nln_tusdt', 'BID', '*', 0.01, 0.01),
43+
(19, 'nln_tbtc', 'ASK', '*', 0.01, 0.01),
44+
(20, 'nln_tbtc', 'BID', '*', 0.01, 0.01),
45+
(21, 'teth_tusdt', 'ASK', '*', 0.01, 0.01),
46+
(22, 'teth_tusdt', 'BID', '*', 0.01, 0.01),
47+
(23, 'nln_teth', 'ASK', '*', 0.01, 0.01),
48+
(24, 'nln_teth', 'BID', '*', 0.01, 0.01)
4349
ON CONFLICT DO NOTHING;
4450

4551
SELECT setval(pg_get_serial_sequence('pair_fee_config', 'id'), (SELECT MAX(id) FROM pair_fee_config));

api/api-ports/api-persister-postgres/src/main/resources/data.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ VALUES ('btc_usdt', 'BTCUSDT'),
33
('eth_usdt', 'ETHUSDT'),
44
('eth_btc', 'ETHBTC'),
55
('nln_usdt', 'NLNUSDT'),
6-
('nln_btc', 'NLNBTC')
6+
('nln_btc', 'NLNBTC'),
7+
('btc_irt', 'BTCIRT'),
8+
('eth_irt', 'ETHIRT')
79
ON CONFLICT DO NOTHING;
810

911
-- Test symbol mapper

bc-gateway/bc-gateway-ports/bc-gateway-persister-postgres/src/main/resources/data.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
INSERT INTO currency
22
VALUES ('BTC', 'Bitcoin'),
33
('ETH', 'Ethereum'),
4-
('USDT', 'Tether')
4+
('USDT', 'Tether'),
5+
('IRT', 'Toman')
56
ON CONFLICT DO NOTHING;
67

78
-- Test currency

matching-engine/matching-engine-app/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ spring:
1111
host: ${REDIS_HOST:localhost}
1212
port: 6379
1313
app:
14-
symbols: btc_usdt,eth_usdt,eth_btc,tbtc_tusdt,teth_tusdt,teth_tbtc
14+
symbols: btc_usdt,eth_usdt,eth_btc,tbtc_tusdt,teth_tusdt,teth_tbtc,btc_irt,eth_irt

wallet/wallet-ports/wallet-persister-postgres/src/main/resources/data.sql

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ VALUES ('btc', 'btc', 0.000001),
99
('eth', 'eth', 0.00001),
1010
('usdt', 'usdt', 0.01),
1111
('nln', 'nln', 1),
12-
('IRT', 'IRT', 1)
12+
('irt', 'irt', 1)
1313
ON CONFLICT DO NOTHING;
1414

1515
-- Test currency
@@ -23,15 +23,17 @@ INSERT INTO currency_rate(id, source_currency, dest_currency, rate)
2323
VALUES (1, 'btc', 'nln', 5500000),
2424
(2, 'usdt', 'nln', 100),
2525
(3, 'btc', 'usdt', 55000),
26-
(4, 'eth', 'usdt', 3800)
26+
(4, 'eth', 'usdt', 3800),
27+
(5, 'btc', 'irt', 3800),
28+
(6, 'eth', 'irt', 3800)
2729
ON CONFLICT DO NOTHING;
2830

2931
-- Test currency rate
3032
INSERT INTO currency_rate(id, source_currency, dest_currency, rate)
31-
VALUES (5, 'tbtc', 'nln', 5500000),
32-
(6, 'tusdt', 'nln', 100),
33-
(7, 'tbtc', 'tusdt', 55000),
34-
(8, 'teth', 'tusdt', 3800)
33+
VALUES (7, 'tbtc', 'nln', 5500000),
34+
(8, 'tusdt', 'nln', 100),
35+
(9, 'tbtc', 'tusdt', 55000),
36+
(10, 'teth', 'tusdt', 3800)
3537
ON CONFLICT DO NOTHING;
3638

3739
SELECT setval(pg_get_serial_sequence('currency_rate', 'id'), (SELECT MAX(id) FROM currency_rate));
@@ -45,8 +47,8 @@ VALUES (1, 1, 'main', 'btc', 10),
4547
(6, 1, 'exchange', 'nln', 0),
4648
(7, 1, 'main', 'eth', 10000),
4749
(8, 1, 'exchange', 'eth', 0),
48-
(9, 1, 'main', 'IRT', 100000000),
49-
(10, 1, 'exchange', 'IRT', 0)
50+
(9, 1, 'main', 'irt', 100000000),
51+
(10, 1, 'exchange', 'irt', 0)
5052
ON CONFLICT DO NOTHING;
5153

5254
-- Test wallet

0 commit comments

Comments
 (0)