Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
add ChangeOwnerAddressParams to api (#1083)
Browse files Browse the repository at this point in the history
  • Loading branch information
rllola authored Sep 5, 2023
1 parent 5f7cd36 commit 741ddea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion signer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ tiny-bip39 = "0.8.0"

zx-bip44 = "0.1.0"

extras = { package = "extras-filecoin", version = "0.1.0" }
extras = { package = "extras-filecoin", version = "0.2.0" }
# extras = { package = "extras-filecoin", path = "../extras" }


Expand Down
4 changes: 4 additions & 0 deletions signer/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ pub enum MessageParams {
UpdateChannelStateParams(fil_actor_paych::UpdateChannelStateParams),
//#[serde(with = "miner::MinerConstructorParamsAPI")]
//MinerConstructorParams(fil_actor_miner::MinerConstructorParams),
#[serde(with = "miner::ChangeOwnerAddressParamsAPI")]
ChangeOwnerAddressParamsAPI(fil_actor_miner::ChangeOwnerAddressParams),
#[serde(with = "miner::ChangeWorkerAddressParamsAPI")]
ChangeWorkerAddressParams(fil_actor_miner::ChangeWorkerAddressParams),
#[serde(with = "miner::ChangePeerIDParamsAPI")]
Expand Down Expand Up @@ -104,6 +106,8 @@ impl MessageParams {
.map_err(|err| SignerError::GenericString(err.to_string()))?,
//MessageParams::MinerConstructorParams(params) => RawBytes::serialize(&params)
// .map_err(|err| SignerError::GenericString(err.to_string()))?,
MessageParams::ChangeOwnerAddressParamsAPI(params) => RawBytes::serialize(&params)
.map_err(|err| SignerError::GenericString(err.to_string()))?,
MessageParams::ChangeWorkerAddressParams(params) => RawBytes::serialize(&params)
.map_err(|err| SignerError::GenericString(err.to_string()))?,
MessageParams::ChangePeerIDParams(params) => RawBytes::serialize(&params)
Expand Down
1 change: 0 additions & 1 deletion test_vectors/deserialize_params.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,5 @@
"CodeCid": "bafkqadtgnfwc6mrpnv2wy5djonuwo",
"ConstructorParams": "hIFVAWw6rTHy7RkyBG6q8O/jwN4sL9OTARhkGgAD2os="
}

}
]
7 changes: 7 additions & 0 deletions test_vectors/serialize_params.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,12 @@
"AmountRequested": "120"
},
"serialized_params": "gUIAeA=="
},
{
"description": "serialize parameters to cbor data test with PascalCase n°7",
"params": {
"NewOwner": "f17uoq6tp427uzv7fztkbsnn64iwotfrristwpryy"
},
"serialized_params": "VQH9HQ9N/Nfpmvy5moMmt9xFnTLGKA=="
}
]

0 comments on commit 741ddea

Please sign in to comment.