@arbius/aa-wallet
Version:
A secure and flexible Account Abstraction wallet implementation for Arbitrum One chain applications.
21 lines (20 loc) • 556 B
JavaScript
export function broadcastTxUpdate(transaction) {
if (typeof BroadcastChannel === 'undefined') {
return;
}
const channel = new BroadcastChannel('aa-wallet-tx-queue');
channel.postMessage({
transaction,
timestamp: Date.now(),
});
}
export function broadcastWalletState(state) {
if (typeof BroadcastChannel === 'undefined') {
return;
}
const channel = new BroadcastChannel('aa-wallet-state');
channel.postMessage({
state,
timestamp: Date.now(),
});
}