Skip to content

Commit

Permalink
fix: retrieving public key from wallet for bond transactions (#485)
Browse files Browse the repository at this point in the history
* fix: retrieving public key from wallet for bond transactions

* chore: fixing linting issues

* test: fixing a broken test

* test: add more tests to cover the changes

* chore: fixing linting issues
  • Loading branch information
b00f authored May 27, 2023
1 parent 24442b8 commit 232017f
Show file tree
Hide file tree
Showing 18 changed files with 483 additions and 196 deletions.
3 changes: 0 additions & 3 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ func PactusHomeDir() string {
} else {
home = path.Join(usr.HomeDir, "pactus")
}

// TODO: remove it before the mainnet launch
home = path.Join(home, "testnet")
}
return home
}
Expand Down
80 changes: 66 additions & 14 deletions cmd/gtk/assets/ui/dialog_transaction_bond.ui
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkDialog" id="id_dialog_transaction_bond">
<property name="width-request">600</property>
<property name="can-focus">False</property>
<property name="title" translatable="yes">Broadcasting Bond transaction</property>
<property name="modal">True</property>
Expand Down Expand Up @@ -100,7 +101,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="id_label_balance">
<object class="GtkLabel" id="id_hint_sender">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
Expand All @@ -112,6 +113,17 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
Expand All @@ -122,34 +134,63 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="id_entry_receiver">
<object class="GtkComboBoxText" id="id_combo_receiver">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="width-chars">32</property>
<property name="caps-lock-warning">False</property>
<property name="has-focus">True</property>
<property name="is-focus">True</property>
<property name="has-entry">True</property>
<child internal-child="entry">
<object class="GtkEntry">
<property name="can-focus">True</property>
<signal name="changed" handler="on_receiver_changed" swapped="no"/>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="id_hint_receiver">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Validator public key (only for the first transaction):</property>
<property name="label" translatable="yes">Validator public key (Optional; Only set when it is not your validator):</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="position">8</property>
</packing>
</child>
<child>
Expand All @@ -160,7 +201,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="position">9</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">10</property>
</packing>
</child>
<child>
Expand All @@ -173,7 +225,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
<property name="position">11</property>
</packing>
</child>
<child>
Expand All @@ -189,11 +241,11 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">8</property>
<property name="position">12</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="id_label_payable">
<object class="GtkLabel" id="id_hint_amount">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
Expand All @@ -202,7 +254,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="position">13</property>
</packing>
</child>
</object>
Expand Down
54 changes: 45 additions & 9 deletions cmd/gtk/assets/ui/dialog_transaction_transfer.ui
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkDialog" id="id_dialog_transaction_transfer">
<property name="width-request">600</property>
<property name="can-focus">False</property>
<property name="title" translatable="yes">Broadcasting Transfer transaction</property>
<property name="modal">True</property>
Expand Down Expand Up @@ -65,7 +66,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="position">1</property>
</packing>
</child>
<child>
Expand Down Expand Up @@ -100,7 +101,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="id_label_balance">
<object class="GtkLabel" id="id_hint_sender">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
Expand All @@ -112,6 +113,17 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
Expand All @@ -122,7 +134,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">4</property>
</packing>
</child>
<child>
Expand All @@ -132,11 +144,35 @@
<property name="hexpand">True</property>
<property name="width-chars">32</property>
<property name="caps-lock-warning">False</property>
<signal name="changed" handler="on_receiver_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="id_hint_receiver">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
</packing>
</child>
<child>
Expand All @@ -149,7 +185,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="position">8</property>
</packing>
</child>
<child>
Expand All @@ -165,11 +201,11 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="position">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="id_label_payable">
<object class="GtkLabel" id="id_hint_amount">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
Expand All @@ -178,15 +214,15 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
<property name="position">10</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">8</property>
<property name="position">1</property>
<property name="position">0</property>
</packing>
</child>
</object>
Expand Down
Loading

0 comments on commit 232017f

Please sign in to comment.