mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2024-11-10 09:18:15 +11:00
multisig: Cleaned up code and added checks to not show >n signers
This commit is contained in:
parent
6cc6cd4a79
commit
fe7fc4cee9
@ -515,7 +515,7 @@ namespace FireWallet
|
|||||||
notifyForm2.Dispose();
|
notifyForm2.Dispose();
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
else if (!mainForm.WatchOnly)
|
else if (mainForm.multiSig)
|
||||||
{
|
{
|
||||||
string batchTX = "[" + string.Join(", ", batches.Select(batch => batch.ToString())) + "]";
|
string batchTX = "[" + string.Join(", ", batches.Select(batch => batch.ToString())) + "]";
|
||||||
string content = "{\"method\": \"createbatch\",\"params\":[ " + batchTX + "]}";
|
string content = "{\"method\": \"createbatch\",\"params\":[ " + batchTX + "]}";
|
||||||
|
2
FireWallet/ImportTXForm.Designer.cs
generated
2
FireWallet/ImportTXForm.Designer.cs
generated
@ -106,7 +106,7 @@
|
|||||||
Cancelbutton2.TabIndex = 2;
|
Cancelbutton2.TabIndex = 2;
|
||||||
Cancelbutton2.Text = "Cancel";
|
Cancelbutton2.Text = "Cancel";
|
||||||
Cancelbutton2.UseVisualStyleBackColor = true;
|
Cancelbutton2.UseVisualStyleBackColor = true;
|
||||||
Cancelbutton2.Click += Cancelbutton2_Click;
|
Cancelbutton2.Click += Cancel;
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
|
@ -66,7 +66,7 @@ namespace FireWallet
|
|||||||
ParseTX();
|
ParseTX();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Cancelbutton2_Click(object sender, EventArgs e)
|
private void Cancel(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
@ -137,18 +137,16 @@ namespace FireWallet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Set sig label sizes
|
// Set sig label sizes
|
||||||
labelSigsReq.Width = (labelSigsTotal.Width / totalSigs) * reqSigs;
|
labelSigsReq.Width = (labelSigsTotal.Width / totalSigs) * reqSigs;
|
||||||
labelSigsSigned.Width = (labelSigsTotal.Width / totalSigs) * sigs;
|
labelSigsSigned.Width = (labelSigsTotal.Width / totalSigs) * sigs;
|
||||||
labelSigInfo.Text = "Signed: " + sigs + "\nReq: " + reqSigs + " of " + totalSigs;
|
labelSigInfo.Text = "Signed: " + sigs + "\nReq: " + reqSigs + " of " + totalSigs;
|
||||||
|
|
||||||
|
if (sigs >= totalSigs)
|
||||||
|
{
|
||||||
|
buttonSign.Enabled = false;
|
||||||
|
buttonSign.Text = "Signed";
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < inputs.Count; i++)
|
for (int i = 0; i < inputs.Count; i++)
|
||||||
{
|
{
|
||||||
@ -202,18 +200,6 @@ namespace FireWallet
|
|||||||
PanelInput.Controls.Add(amount);
|
PanelInput.Controls.Add(amount);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//if (input["path"].ToString() != "")
|
|
||||||
//{
|
|
||||||
// Label ownAddress = new Label();
|
|
||||||
// ownAddress.Text = "Own Address";
|
|
||||||
// ownAddress.Location = new Point(PanelInput.Width - 100, 5);
|
|
||||||
// ownAddress.AutoSize = true;
|
|
||||||
// PanelInput.Controls.Add(ownAddress);
|
|
||||||
//}
|
|
||||||
|
|
||||||
panelIn.Controls.Add(PanelInput);
|
panelIn.Controls.Add(PanelInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,7 +294,9 @@ namespace FireWallet
|
|||||||
labelSigInfo.Text = "Signed: " + sigs + "\nReq: " + reqSigs + " of " + totalSigs;
|
labelSigInfo.Text = "Signed: " + sigs + "\nReq: " + reqSigs + " of " + totalSigs;
|
||||||
signedTX = response;
|
signedTX = response;
|
||||||
} else {
|
} else {
|
||||||
|
NotifyForm notifyForm = new NotifyForm("Ledger signing not supported yet 😢");
|
||||||
|
notifyForm.ShowDialog();
|
||||||
|
notifyForm.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2779,7 +2779,6 @@ namespace FireWallet
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddLog(covenant.ToString());
|
|
||||||
string hash = covenant["items"][0].ToString();
|
string hash = covenant["items"][0].ToString();
|
||||||
if (hashes.ContainsKey(hash))
|
if (hashes.ContainsKey(hash))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user