Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite8ddcf4

Browse files
author
Steven Masley
committed
Fixed upate adding entries, still some bugs
1 parente8404ce commite8ddcf4

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

‎cryptid/CandidateDelegate.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public static byte[] UpdateCandidate(Candidate newCandidate, string password, Fi
101101
varcur=newCandidateUpdatedRecord(chainToUpdate,newChainId);
102102

103103
varentryApi=newEntry();
104-
varoldRecordEntry=entryApi.NewEntry(ovr.Pack(privKey),null,Arrays.ByteArrayToHex(newChainId));
105-
varnewRecordEntry=entryApi.NewEntry(cur.Pack(privKey),null,Arrays.ByteArrayToHex(chainToUpdate));
104+
varoldRecordEntry=entryApi.NewEntry(ovr.Pack(privKey),null,newChainId);
105+
varnewRecordEntry=entryApi.NewEntry(cur.Pack(privKey),null,chainToUpdate);
106106

107107
entryApi.CommitEntry(oldRecordEntry,FactomWallet);
108108
entryApi.CommitEntry(newRecordEntry,FactomWallet);

‎cryptid/Factom/API/Entry.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ public class Entry {
3737
/// <param name="extIds">Unique Ids used for first entry of chain to construct a unique chain ID</param>
3838
/// <param name="chainId">ChainID</param>
3939
/// <returns>EntryData object</returns>
40-
publicEntryDataNewEntry(byte[]content,byte[][]extIds,stringchainId){
40+
publicEntryDataNewEntry(byte[]content,byte[][]extIds,byte[]chainId){
4141
EntryDataentry=newEntryData();
4242
entry.Content=content;
4343
entry.ExtIDs=extIds;
44+
entry.ChainId=chainId;
4445
returnentry;
4546
}
4647

@@ -188,7 +189,7 @@ public byte[] CommitEntry(EntryData entry, string name) {
188189
if(resp.StatusCode!=HttpStatusCode.OK){
189190
thrownewFactomEntryException("Entry Commit Failed. Message: "+resp.ErrorMessage);
190191
}
191-
Console.WriteLine("CommitEntry Resp = "+resp.StatusCode+"|"+resp.StatusCode);
192+
//Console.WriteLine("CommitEntry Resp = " + resp.StatusCode + "|" + resp.StatusCode);
192193
if(entry.ExtIDs!=null){
193194
returnEntries.ChainIdOfFirstEntry(entry);
194195
}else{

‎cryptidDemo/GeneratorForm.cs‎

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -324,24 +324,23 @@ private void updateID_Click(object sender, EventArgs e) {
324324
DialogResultd=MessageBox.Show(Resources.UPDATE_ID_WARNING,Resources.ARE_YOU_SURE,MessageBoxButtons.YesNo,MessageBoxIcon.Question);
325325
if(d!=DialogResult.Yes)return;
326326

327-
Fingerprintfp=newFingerprint();
328-
if(connectDialog.IsConnected){
329-
varscanForm=newScanFingerForm();
330-
vardr=scanForm.ShowDialog(this);
331-
if(dr==DialogResult.OK){
332-
fp.AsBitmap=scanForm.Fingerprint;
333-
}else{
334-
scanForm.Dispose();
335-
return;
336-
}
337-
338-
scanForm.Dispose();
339-
}else{
340-
MessageBox.Show(Resources.FPS_NOT_CONNECTED_ERROR,Resources.ERROR,MessageBoxButtons.OK,MessageBoxIcon.Error);
341-
return;
342-
}
343-
344-
CandidateDelegate.UpdateCandidate(_c,password.Text,fp,PrivateKey,Convert.FromBase64String(chainId.Text));
327+
Fingerprintfp=newFingerprint();
328+
if(connectDialog.IsConnected){
329+
varscanForm=newScanFingerForm();
330+
vardr=scanForm.ShowDialog(this);
331+
if(dr==DialogResult.OK){
332+
fp.AsBitmap=scanForm.Fingerprint;
333+
}else{
334+
scanForm.Dispose();
335+
return;
336+
}
337+
338+
scanForm.Dispose();
339+
}else{
340+
MessageBox.Show(Resources.FPS_NOT_CONNECTED_ERROR,Resources.ERROR,MessageBoxButtons.OK,MessageBoxIcon.Error);
341+
return;
342+
}
343+
chainId.Text=Convert.ToBase64String(CandidateDelegate.UpdateCandidate(_c,password.Text,fp,PrivateKey,Convert.FromBase64String(chainId.Text)));
345344
}
346345
}
347346
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp