Skip to content

Commit

Permalink
choir: change default key and add additional message data
Browse files Browse the repository at this point in the history
  • Loading branch information
BalazsSevecsek committed Dec 11, 2024
1 parent b06ec5d commit 3696c8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src-tauri/src/app_in_memory_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl Default for AppInMemoryConfig {

const AIRDROP_WEBSOCKET_CRYPTO_KEY: &str = match option_env!("AIRDROP_WEBSOCKET_CRYPTO_KEY") {
Some(value) => value,
None => "4d43344341514177425159444b32567742434945494f543067614b2f464f4549444c54395a546152714349774b536c5362686a696d4f425171485769704e674b",
None => "4d43344341514177425159444b325677424349454943443235436e576b454f5a796833346a5479566c36484f4e396d4e31594248354374536f2f6439414f3145",
};

pub fn get_websocket_key() -> anyhow::Result<Ed25519KeyPair> {
Expand Down
11 changes: 9 additions & 2 deletions src/hooks/airdrop/useWebsocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ export const useWebsocket = () => {
const handleEmitMiningStatus = useCallback(
async (isMining: boolean) => {
if (!socket || !connectedSocket) return;
const payload = { isMining, appId, blockHeight: height, version: applicationsVersions?.tari_universe };
const payload = {
isMining,
appId,
blockHeight: height,
version: applicationsVersions?.tari_universe,
network,
userId,
};
try {
const transformedPayload = btoa(JSON.stringify(payload));
const signatureData = (await invoke('sign_ws_data', {
Expand All @@ -50,7 +57,7 @@ export const useWebsocket = () => {
console.error(e);
}
},
[appId, connectedSocket, height, applicationsVersions?.tari_universe]
[connectedSocket, appId, height, applicationsVersions?.tari_universe, network, userId]
);

useEffect(() => {
Expand Down

0 comments on commit 3696c8e

Please sign in to comment.