fix: Amélioration de la synchronisation pour quorum=1 et ajout favicon
- Synchronisation forcée du processus pour quorum=1 test - Mise à jour device plus fréquente dans les premières tentatives - Tentative de synchronisation SDK au 3ème essai - Ajout favicon.svg avec icône de bouclier - Ajout des liens favicon dans index.html - Meilleure gestion des processus de pairing avec quorum=1
This commit is contained in:
parent
ca4e580a95
commit
baad7c48bc
@ -7,7 +7,8 @@
|
|||||||
<meta name="keywords" content="4NK web5 bitcoin blockchain decentralize dapps relay contract">
|
<meta name="keywords" content="4NK web5 bitcoin blockchain decentralize dapps relay contract">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="./style/4nk.css">
|
<link rel="stylesheet" href="./style/4nk.css">
|
||||||
<script src="https://unpkg.com/html5-qrcode"></script>
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||||
|
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||||
<title>4NK Application</title>
|
<title>4NK Application</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
27
public/favicon.svg
Normal file
27
public/favicon.svg
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="shieldGradient" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||||
|
<stop offset="0%" style="stop-color:#3a506b;stop-opacity:1" />
|
||||||
|
<stop offset="100%" style="stop-color:#2c3e50;stop-opacity:1" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<!-- Bouclier principal -->
|
||||||
|
<path d="M16 2L6 6v10c0 8 10 12 10 12s10-4 10-12V6L16 2z"
|
||||||
|
fill="url(#shieldGradient)"
|
||||||
|
stroke="#1a252f"
|
||||||
|
stroke-width="0.5"/>
|
||||||
|
|
||||||
|
<!-- Symbole de sécurité au centre -->
|
||||||
|
<path d="M12 16l3 3 6-6"
|
||||||
|
stroke="#ffffff"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
fill="none"/>
|
||||||
|
|
||||||
|
<!-- Points de sécurité -->
|
||||||
|
<circle cx="16" cy="8" r="1" fill="#ffffff" opacity="0.8"/>
|
||||||
|
<circle cx="20" cy="12" r="0.8" fill="#ffffff" opacity="0.6"/>
|
||||||
|
<circle cx="12" cy="12" r="0.8" fill="#ffffff" opacity="0.6"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 973 B |
@ -907,6 +907,22 @@ export default class Services {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For quorum=1, try to force process synchronization
|
||||||
|
if (i === 2) {
|
||||||
|
try {
|
||||||
|
console.log(`🔄 Forcing process synchronization for quorum=1 test...`);
|
||||||
|
// Force the SDK to recognize this as a pairing process
|
||||||
|
const process = await this.getProcess(processId);
|
||||||
|
if (process) {
|
||||||
|
console.log(`🔄 Process found, attempting to sync with SDK...`);
|
||||||
|
// Try to trigger SDK synchronization
|
||||||
|
await this.sdkClient.get_pairing_process_id();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(`⚠️ Process synchronization attempt failed: ${(e as Error).message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the process exists in our processes list
|
// Check if the process exists in our processes list
|
||||||
try {
|
try {
|
||||||
const process = await this.getProcess(processId);
|
const process = await this.getProcess(processId);
|
||||||
@ -940,6 +956,17 @@ export default class Services {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For quorum=1 test, if we have a process but no commitment yet,
|
||||||
|
// try to force synchronization by calling updateDevice more frequently
|
||||||
|
if (i < 5) {
|
||||||
|
try {
|
||||||
|
await this.updateDevice();
|
||||||
|
console.log(`🔄 Forced device update on attempt ${i + 1}`);
|
||||||
|
} catch (e) {
|
||||||
|
console.log(`⚠️ Forced device update failed: ${(e as Error).message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
console.log(`⏳ Still waiting for SDK synchronization... (${i + 1}/${maxRetries})`);
|
console.log(`⏳ Still waiting for SDK synchronization... (${i + 1}/${maxRetries})`);
|
||||||
|
|
||||||
// Only try updateDevice every 5 attempts to avoid spam
|
// Only try updateDevice every 5 attempts to avoid spam
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user