mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2024-11-24 08:08:14 +11:00
tx: Get TX on load to lower memory use
This commit is contained in:
parent
1675ac48f3
commit
036819169d
@ -17,7 +17,8 @@ namespace FireWallet
|
|||||||
{
|
{
|
||||||
MainForm mainForm;
|
MainForm mainForm;
|
||||||
JObject tx;
|
JObject tx;
|
||||||
public TXForm(MainForm mainForm, JObject tx)
|
string txid;
|
||||||
|
public TXForm(MainForm mainForm, string txid)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// Theme
|
// Theme
|
||||||
@ -29,16 +30,20 @@ namespace FireWallet
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.mainForm = mainForm;
|
this.mainForm = mainForm;
|
||||||
this.tx = tx;
|
this.txid = txid;
|
||||||
|
|
||||||
this.Text = "TX: " + tx["hash"].ToString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void TXForm_Load(object sender, EventArgs e)
|
private async void TXForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
tx = JObject.Parse(await mainForm.APIGet("wallet/"+mainForm.account+"/tx/" + txid,true));
|
||||||
|
|
||||||
|
this.Text = "TX: " + tx["hash"].ToString();
|
||||||
labelHash.Text = "Hash: " + tx["hash"].ToString();
|
labelHash.Text = "Hash: " + tx["hash"].ToString();
|
||||||
mainForm.AddLog("Viewing TX: " + tx["hash"].ToString());
|
mainForm.AddLog("Viewing TX: " + tx["hash"].ToString());
|
||||||
|
|
||||||
|
// Disable scrolling on the panels until they are populated
|
||||||
|
panelInputs.Visible = false;
|
||||||
|
panelOutputs.Visible = false;
|
||||||
|
|
||||||
// For each input
|
// For each input
|
||||||
JArray inputs = (JArray)tx["inputs"];
|
JArray inputs = (JArray)tx["inputs"];
|
||||||
@ -131,6 +136,9 @@ namespace FireWallet
|
|||||||
|
|
||||||
panelOutputs.Controls.Add(PanelOutput);
|
panelOutputs.Controls.Add(PanelOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
panelInputs.Visible = true;
|
||||||
|
panelOutputs.Visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Explorer_Click(object sender, EventArgs e)
|
private void Explorer_Click(object sender, EventArgs e)
|
||||||
|
Loading…
Reference in New Issue
Block a user