diff --git a/VERSION.properties b/VERSION.properties index 5a94fd3..aa8d08c 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.292 -server.version=1.2.272 +client.version=1.2.293 +server.version=1.2.273 diff --git a/shine-UI/js/services/shine-user-pda-service.js b/shine-UI/js/services/shine-user-pda-service.js index 4182879..843c6b5 100644 --- a/shine-UI/js/services/shine-user-pda-service.js +++ b/shine-UI/js/services/shine-user-pda-service.js @@ -155,11 +155,12 @@ function parseUsersEconomyConfig(dataBytes) { }; } -function buildEd25519IxData(sig64, pubkey32, msgHash32) { +function buildEd25519IxData(sig64, pubkey32, messageBytes) { const sigOff = 16; const pkOff = sigOff + 64; const msgOff = pkOff + 32; - const data = new Uint8Array(msgOff + 32); + const msg = messageBytes instanceof Uint8Array ? messageBytes : new Uint8Array(messageBytes || []); + const data = new Uint8Array(msgOff + msg.length); const view = new DataView(data.buffer); data[0] = 1; data[1] = 0; @@ -168,11 +169,11 @@ function buildEd25519IxData(sig64, pubkey32, msgHash32) { view.setUint16(6, pkOff, true); view.setUint16(8, 0xffff, true); view.setUint16(10, msgOff, true); - view.setUint16(12, 32, true); + view.setUint16(12, msg.length, true); view.setUint16(14, 0xffff, true); data.set(sig64, sigOff); data.set(pubkey32, pkOff); - data.set(msgHash32, msgOff); + data.set(msg, msgOff); return data; }