Skip to content

Commit 2ec55dc

Browse files
authored
Merge pull request #19 from arkanoider/main
chore: updated restore message
2 parents 3e16525 + e64b5b1 commit 2ec55dc

1 file changed

Lines changed: 39 additions & 36 deletions

File tree

src/restore_session.md

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,33 @@ Mostro will respond with a message containing all non-finalized orders (e.g., st
2626
"version": 1,
2727
"action": "restore-session",
2828
"payload": {
29-
"orders": [
30-
{
31-
"id": "<Order Id>",
32-
"trade_index": 1,
33-
"status": "pending"
34-
},
35-
{
36-
"id": "<Order Id>",
37-
"trade_index": 2,
38-
"status": "active"
39-
},
40-
{
41-
"id": "<Order Id>",
42-
"trade_index": 3,
43-
"status": "fiat-sent"
44-
}
45-
],
46-
"disputes": [
47-
{
48-
"dispute_id": "<Dispute Id>",
49-
"order_id": "<Order Id>",
50-
"trade_index": 4,
51-
"status": "initiated"
52-
}
53-
]
29+
"restore_data": {
30+
"orders": [
31+
{
32+
"id": "<Order Id>",
33+
"trade_index": 1,
34+
"status": "pending"
35+
},
36+
{
37+
"id": "<Order Id>",
38+
"trade_index": 2,
39+
"status": "active"
40+
},
41+
{
42+
"id": "<Order Id>",
43+
"trade_index": 3,
44+
"status": "fiat-sent"
45+
}
46+
],
47+
"disputes": [
48+
{
49+
"dispute_id": "<Dispute Id>",
50+
"order_id": "<Order Id>",
51+
"trade_index": 4,
52+
"status": "initiated"
53+
}
54+
]
55+
}
5456
}
5557
}
5658
}
@@ -59,7 +61,7 @@ Mostro will respond with a message containing all non-finalized orders (e.g., st
5961
### Fields
6062

6163
* `orders`: An array of active or ongoing orders with their `id`, `trade_index`, and current `status`.
62-
* `disputes`: An array of ongoing disputes with `dispute_id`, the associated `order_id`, and `trade_index`.
64+
* `disputes`: An array of ongoing disputes with `dispute_id`, the associated `order_id`, and `trade_index` and current `status` of the dispute.
6365

6466
## Example Use Case
6567

@@ -77,17 +79,18 @@ When switching to desktop, after restoring the mnemonic, the client sends `resto
7779
"version": 1,
7880
"action": "restore-session",
7981
"payload": {
80-
"orders": [
81-
{ "id": "abc-123", "trade_index": 1, "status": "pending" },
82-
{ "id": "def-456", "trade_index": 2, "status": "pending" },
83-
{ "id": "ghi-789", "trade_index": 3, "status": "active" },
84-
{ "id": "xyz-999", "trade_index": 4, "status": "dispute" }
85-
],
86-
"disputes": [
87-
{ "dispute_id": "dis-001", "order_id": "xyz-999", "trade_index": 4, "status": "initiated" }
88-
]
82+
"restore_data": {
83+
"orders": [
84+
{ "id": "abc-123", "trade_index": 1, "status": "pending" },
85+
{ "id": "def-456", "trade_index": 2, "status": "pending" },
86+
{ "id": "ghi-789", "trade_index": 3, "status": "active" },
87+
{ "id": "xyz-999", "trade_index": 4, "status": "dispute" }
88+
],
89+
"disputes": [
90+
{ "dispute_id": "dis-001", "order_id": "xyz-999", "trade_index": 4, "status": "initiated" }
91+
]
92+
}
8993
}
9094
}
9195
}
9296
```
93-

0 commit comments

Comments
 (0)