refactor names

This commit is contained in:
liamcottle 2025-02-15 22:56:16 +13:00
parent 2aeb37ffa8
commit 1a76e7a50e

View file

@ -56,7 +56,7 @@
<!-- actions -->
<div class="border bg-gray-50 rounded shadow">
<div class="p-3 space-x-1">
<button @click="sendCommandAppStart" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
<button @click="getSelfInfo" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
AppStart
</button>
<button @click="sendZeroHopAdvert" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
@ -71,7 +71,7 @@
<button @click="setAdvertLatLon" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
SetAdvertLatLon
</button>
<button @click="sendCommandAddUpdateContact" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
<button @click="addOrUpdateContact" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
AddUpdateContact
</button>
<button @click="syncNextMessage" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
@ -235,7 +235,7 @@
return pathHashes.join(" -> ");
},
async sendCommandAppStart() {
async getSelfInfo() {
const selfInfo = await this.connection.getSelfInfo();
console.log(selfInfo);
},
@ -295,7 +295,7 @@
console.log(lat, lon);
await this.connection.setAdvertLatLong(lat, lon);
},
async sendCommandAddUpdateContact() {
async addOrUpdateContact() {
const publicKey = new Uint8Array([148, 63, 175, 162, 88, 212, 192, 40, 214, 185, 213, 140, 42, 145, 194, 186, 70, 71, 112, 68, 0, 192, 65, 4, 105, 143, 230, 50, 162, 79, 247, 192]);
const type = Constants.AdvType.Chat;
const flags = 0;
@ -305,7 +305,7 @@
const lastAdvert = 1739244825;
const advLat = 0;
const advLon = 0;
await this.connection.sendCommandAddUpdateContact(publicKey, type, flags, outPathLen, outPath, advName, lastAdvert, advLat, advLon);
await this.connection.addOrUpdateContact(publicKey, type, flags, outPathLen, outPath, advName, lastAdvert, advLat, advLon);
},
async syncNextMessage() {
const message = await this.connection.syncNextMessage();