Skip to content

Commit

Permalink
Add missing PurseIdentifier variant
Browse files Browse the repository at this point in the history
  • Loading branch information
jacek-casper committed Apr 11, 2024
1 parent 09b6ca4 commit 879ac90
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions resources/test/rpc_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7190,6 +7190,19 @@
},
"additionalProperties": false
},
{
"description": "The main purse of the account identified by this entity address.",
"type": "object",
"required": [
"main_purse_under_entity_addr"
],
"properties": {
"main_purse_under_entity_addr": {
"$ref": "#/components/schemas/EntityAddr"
}
},
"additionalProperties": false
},
{
"description": "The purse identified by this URef.",
"type": "object",
Expand Down
3 changes: 3 additions & 0 deletions rpc_sidecar/src/rpcs/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,8 @@ pub enum PurseIdentifier {
MainPurseUnderPublicKey(PublicKey),
/// The main purse of the account identified by this account hash.
MainPurseUnderAccountHash(AccountHash),
/// The main purse of the account identified by this entity address.
MainPurseUnderEntityAddr(EntityAddr),
/// The purse identified by this URef.
PurseUref(URef),
}
Expand All @@ -886,6 +888,7 @@ impl PurseIdentifier {
Self::MainPurseUnderAccountHash(account_hash) => {
PortPurseIdentifier::Account(account_hash)
}
Self::MainPurseUnderEntityAddr(entity_addr) => PortPurseIdentifier::Entity(entity_addr),
Self::PurseUref(uref) => PortPurseIdentifier::Purse(uref),
}
}
Expand Down

0 comments on commit 879ac90

Please sign in to comment.