Skip to content

Commit

Permalink
chore(cardano): rename voting public key to vote public key
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmisiak authored and matejcik committed Mar 6, 2023
1 parent d0e4bbe commit bc28c31
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions protob/messages-cardano.proto
Expand Up @@ -361,20 +361,20 @@ message CardanoTxWithdrawal {
* @embed
*/
message CardanoCVoteRegistrationDelegation {
required bytes voting_public_key = 1;
required bytes vote_public_key = 1;
required uint32 weight = 2;
}

/**
* @embed
*/
message CardanoCVoteRegistrationParametersType {
optional bytes voting_public_key = 1; // mutually exclusive with delegations
optional bytes vote_public_key = 1; // mutually exclusive with delegations
repeated uint32 staking_path = 2;
optional CardanoAddressParametersType payment_address_parameters = 3; // mutually exclusive with payment_address
required uint64 nonce = 4;
optional CardanoCVoteRegistrationFormat format = 5 [default=CIP15];
repeated CardanoCVoteRegistrationDelegation delegations = 6; // mutually exclusive with voting_public_key; max 32 delegations
repeated CardanoCVoteRegistrationDelegation delegations = 6; // mutually exclusive with vote_public_key; max 32 delegations
optional uint64 voting_purpose = 7;
optional string payment_address = 8; // mutually exclusive with payment_address_parameters
}
Expand Down
10 changes: 5 additions & 5 deletions tests/fixtures/cardano/sign_tx.failed.json
Expand Up @@ -1310,7 +1310,7 @@
"withdrawals": [],
"auxiliary_data": {
"cvote_registration_parameters": {
"voting_public_key": "3b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b7",
"vote_public_key": "3b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b7",
"staking_path": "m/1852'/1815'/0'/2/0",
"nonce": 22634813,
"payment_address_parameters": {
Expand Down Expand Up @@ -1360,7 +1360,7 @@
"auxiliary_data": {
"hash": "ea4c91860dd5ec5449f8f985d227946ff39086b17f10b5afb93d12ee87050b6a",
"cvote_registration_parameters": {
"voting_public_key": "38DA0B509D45BF6C87BD55594B92F97081D3923B8C1334B9B8D0BF13FC1C12D0",
"vote_public_key": "38DA0B509D45BF6C87BD55594B92F97081D3923B8C1334B9B8D0BF13FC1C12D0",
"staking_path": "m/1852'/1815'/0'/2/0",
"payment_address_parameters": {
"addressType": 0,
Expand Down Expand Up @@ -1399,7 +1399,7 @@
}
},
{
"description": "transaction with both voting public key and delegations in cvote registration",
"description": "transaction with both vote public key and delegations in cvote registration",
"parameters": {
"protocol_magic": 764824073,
"network_id": 1,
Expand All @@ -1410,7 +1410,7 @@
"withdrawals": [],
"auxiliary_data": {
"cvote_registration_parameters": {
"voting_public_key": "38DA0B509D45BF6C87BD55594B92F97081D3923B8C1334B9B8D0BF13FC1C12D0",
"vote_public_key": "38DA0B509D45BF6C87BD55594B92F97081D3923B8C1334B9B8D0BF13FC1C12D0",
"staking_path": "m/1852'/1815'/0'/2/0",
"payment_address_parameters": {
"addressType": 0,
Expand All @@ -1421,7 +1421,7 @@
"format": 1,
"delegations": [
{
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 1
}
]
Expand Down
16 changes: 8 additions & 8 deletions tests/fixtures/cardano/sign_tx.json
Expand Up @@ -1013,7 +1013,7 @@
"withdrawals": [],
"auxiliary_data": {
"cvote_registration_parameters": {
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"staking_path": "m/1852'/1815'/0'/2/0",
"payment_address_parameters": {
"addressType": 0,
Expand Down Expand Up @@ -1086,11 +1086,11 @@
"format": 1,
"delegations": [
{
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 1
},
{
"voting_public_key": "2af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "2af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 2
}
]
Expand Down Expand Up @@ -1159,7 +1159,7 @@
"format": 1,
"delegations": [
{
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 1
}
],
Expand Down Expand Up @@ -1224,7 +1224,7 @@
"format": 1,
"delegations": [
{
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 1
}
],
Expand Down Expand Up @@ -1293,7 +1293,7 @@
"format": 1,
"delegations": [
{
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 1
}
]
Expand Down Expand Up @@ -1357,7 +1357,7 @@
"format": 1,
"delegations": [
{
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 1
}
],
Expand Down Expand Up @@ -1943,7 +1943,7 @@
"format": 1,
"delegations": [
{
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 1
}
],
Expand Down
6 changes: 3 additions & 3 deletions tests/fixtures/cardano/sign_tx.show_details.json
Expand Up @@ -457,7 +457,7 @@
}
},
{
"description": "transaction with CIP36 registration and voting purpose not specified",
"description": "transaction with CIP36 registration and vote purpose not specified",
"parameters": {
"protocol_magic": 764824073,
"network_id": 1,
Expand All @@ -478,11 +478,11 @@
"format": 1,
"delegations": [
{
"voting_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "1af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 1
},
{
"voting_public_key": "2af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"vote_public_key": "2af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc",
"weight": 2
}
]
Expand Down

0 comments on commit bc28c31

Please sign in to comment.