Skip to content

Commit

Permalink
[Coins API] - add previous transaction to get_coins response (Myste…
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkuo authored Jan 20, 2023
1 parent 000e407 commit 5ff0064
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/sui-json-rpc-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ pub struct Coin {
pub digest: ObjectDigest,
pub balance: u64,
pub locked_until_epoch: Option<EpochId>,
pub previous_transaction: TransactionDigest,
}

impl Coin {
Expand Down
1 change: 1 addition & 0 deletions crates/sui-json-rpc/src/coin_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl CoinReadApi {
digest: o.digest(),
balance,
locked_until_epoch,
previous_transaction: o.previous_transaction,
})
} else {
Err(Error::UnexpectedError(format!(
Expand Down
4 changes: 4 additions & 0 deletions crates/sui-open-rpc/spec/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3097,6 +3097,7 @@
"coinObjectId",
"coinType",
"digest",
"previousTransaction",
"version"
],
"properties": {
Expand All @@ -3122,6 +3123,9 @@
"format": "uint64",
"minimum": 0.0
},
"previousTransaction": {
"$ref": "#/components/schemas/TransactionDigest"
},
"version": {
"$ref": "#/components/schemas/SequenceNumber"
}
Expand Down

0 comments on commit 5ff0064

Please sign in to comment.