This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from fracek/fix-177
Deserialize ManageBuyOffer operation response
- Loading branch information
Showing
8 changed files
with
122 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
stellar-dotnet-sdk-test/testdata/operationManageBuyOffer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"_links": { | ||
"self": { | ||
"href": "https://horizon.stellar.org/operations/105020235379187713" | ||
}, | ||
"transaction": { | ||
"href": "https://horizon.stellar.org/transactions/35b08c8e7fc739ab07fd8eeb9564c59b4f1e85099aa2d3b1d37ed86a6cb5c438" | ||
}, | ||
"effects": { | ||
"href": "https://horizon.stellar.org/operations/105020235379187713/effects" | ||
}, | ||
"succeeds": { | ||
"href": "https://horizon.stellar.org/effects?order=desc&cursor=105020235379187713" | ||
}, | ||
"precedes": { | ||
"href": "https://horizon.stellar.org/effects?order=asc&cursor=105020235379187713" | ||
} | ||
}, | ||
"id": "105020235379187713", | ||
"paging_token": "105020235379187713", | ||
"transaction_successful": true, | ||
"source_account": "GDID4M4PAN3C2JO4PJPCZ4Z6PSYUTW2I32E5EBORECQYIJDGTIZO3N5D", | ||
"type": "manage_buy_offer", | ||
"type_i": 12, | ||
"created_at": "2019-06-21T08:24:48Z", | ||
"transaction_hash": "35b08c8e7fc739ab07fd8eeb9564c59b4f1e85099aa2d3b1d37ed86a6cb5c438", | ||
"amount": "50000.0000000", | ||
"price": "0.0463000", | ||
"price_r": { | ||
"n": 463, | ||
"d": 10000 | ||
}, | ||
"buying_asset_type": "credit_alphanum4", | ||
"buying_asset_code": "RMT", | ||
"buying_asset_issuer": "GDEGOXPCHXWFYY234D2YZSPEJ24BX42ESJNVHY5H7TWWQSYRN5ZKZE3N", | ||
"selling_asset_type": "native", | ||
"offer_id": 0 | ||
} |
38 changes: 23 additions & 15 deletions
38
stellar-dotnet-sdk-test/testdata/operationManageOffer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
{ | ||
"_links": { | ||
"self": { | ||
"href": "http://horizon-testnet.stellar.org/operations/3320426331639809" | ||
"href": "https://horizon.stellar.org/operations/105020235379122177" | ||
}, | ||
"transaction": { | ||
"href": "http://horizon-testnet.stellar.org/transactions/1f8fc03b26110e917d124381645d7dcf85927f17e46d8390d254a0bd99cfb0ad" | ||
"href": "https://horizon.stellar.org/transactions/a76f49631300ec2949716d521da8791fce7db59639b1608a5fcf4e8aff520464" | ||
}, | ||
"effects": { | ||
"href": "http://horizon-testnet.stellar.org/operations/3320426331639809/effects" | ||
"href": "https://horizon.stellar.org/operations/105020235379122177/effects" | ||
}, | ||
"succeeds": { | ||
"href": "http://horizon-testnet.stellar.org/effects?order=desc&cursor=3320426331639809" | ||
"href": "https://horizon.stellar.org/effects?order=desc&cursor=105020235379122177" | ||
}, | ||
"precedes": { | ||
"href": "http://horizon-testnet.stellar.org/effects?order=asc&cursor=3320426331639809" | ||
"href": "https://horizon.stellar.org/effects?order=asc&cursor=105020235379122177" | ||
} | ||
}, | ||
"id": "3320426331639809", | ||
"paging_token": "3320426331639809", | ||
"source_account": "GCR6QXX7IRIJVIM5WA5ASQ6MWDOEJNBW3V6RTC5NJXEMOLVTUVKZ725X", | ||
"id": "105020235379122177", | ||
"paging_token": "105020235379122177", | ||
"transaction_successful": true, | ||
"source_account": "GBX5SNYZYZJQ2JKO43QI3I6K3QGNA4ARRIUSZ2EMIGXLELO3UZG4APNR", | ||
"type": "manage_offer", | ||
"type_i": 3, | ||
"offer_id": 0, | ||
"amount": "100.0", | ||
"buying_asset_type": "credit_alphanum4", | ||
"buying_asset_code": "CNY", | ||
"buying_asset_issuer": "GAZWSWPDQTBHFIPBY4FEDFW2J6E2LE7SZHJWGDZO6Q63W7DBSRICO2KN", | ||
"selling_asset_type": "native" | ||
} | ||
"created_at": "2019-06-21T08:24:48Z", | ||
"transaction_hash": "a76f49631300ec2949716d521da8791fce7db59639b1608a5fcf4e8aff520464", | ||
"amount": "243.7500000", | ||
"price": "8.0850240", | ||
"price_r": { | ||
"n": 5054660, | ||
"d": 625188 | ||
}, | ||
"buying_asset_type": "native", | ||
"selling_asset_type": "credit_alphanum4", | ||
"selling_asset_code": "USD", | ||
"selling_asset_issuer": "GDSRCV5VTM3U7Y3L6DFRP3PEGBNQMGOWSRTGSBWX6Z3H6C7JHRI4XFJP", | ||
"offer_id": 96052902 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
stellar-dotnet-sdk/responses/operations/ManageBuyOfferOperationResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace stellar_dotnet_sdk.responses.operations | ||
{ | ||
public class ManageBuyOfferOperationResponse : ManageOfferOperationResponse | ||
{ | ||
public override int TypeId => 12; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
stellar-dotnet-sdk/responses/operations/ManageSellOfferOperationResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace stellar_dotnet_sdk.responses.operations | ||
{ | ||
public class ManageSellOfferOperationResponse : ManageOfferOperationResponse | ||
{ | ||
public override int TypeId => 3; | ||
} | ||
} |