@ledgerhq/coin-tron
Version:
Ledger Tron Coin integration
23 lines • 771 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hydrate = exports.preload = void 0;
const network_1 = require("../network");
const preload = async () => {
const superRepresentatives = await (0, network_1.getTronSuperRepresentatives)();
return {
superRepresentatives,
};
};
exports.preload = preload;
const hydrate = (data) => {
if (!data || !data.superRepresentatives)
return;
const { superRepresentatives } = data;
if (!superRepresentatives ||
typeof superRepresentatives !== "object" ||
!Array.isArray(superRepresentatives))
return;
(0, network_1.hydrateSuperRepresentatives)(superRepresentatives);
};
exports.hydrate = hydrate;
//# sourceMappingURL=preload.js.map