@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
19 lines • 660 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SyncOneAccountOnMount = void 0;
const react_1 = require("react");
const context_1 = require("./context");
const SyncOneAccountOnMount = ({ priority, accountId, reason = "one-account", }) => {
const sync = (0, context_1.useBridgeSync)();
(0, react_1.useEffect)(() => {
sync({
type: "SYNC_ONE_ACCOUNT",
priority,
accountId,
reason,
});
}, [sync, priority, accountId, reason]);
return null;
};
exports.SyncOneAccountOnMount = SyncOneAccountOnMount;
//# sourceMappingURL=SyncOneAccountOnMount.js.map