@metamask/snaps-simulation
Version:
A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment
39 lines • 1.85 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGetPreferencesMethodImplementation = void 0;
/**
* Get the implementation of the `getPreferences` hook.
*
* @param options - The simulation options.
* @param options.currency - The currency to use.
* @param options.locale - The locale to use.
* @param options.hideBalances - Whether to hide balances.
* @param options.useSecurityAlerts - Whether to run transactions and signatures through security providers.
* @param options.simulateOnChainActions - Whether to simulate transactions and signatures.
* @param options.useTokenDetection - Whether to auto-detect tokens.
* @param options.batchCheckBalances - Whether to fetch balances in an aggregated manner.
* @param options.displayNftMedia - Whether to display NFT media.
* @param options.useNftDetection - Whether to auto-detect NFTs.
* @param options.useExternalPricingData - Whether to get token price data from an external source.
* @param options.showTestnets - Whether to show testnets.
* @returns The implementation of the `getPreferences` hook.
*/
function getGetPreferencesMethodImplementation({ currency, locale, hideBalances, useSecurityAlerts, simulateOnChainActions, useTokenDetection, batchCheckBalances, displayNftMedia, useNftDetection, useExternalPricingData, showTestnets, }) {
return () => {
return {
currency,
locale,
hideBalances,
useSecurityAlerts,
simulateOnChainActions,
useTokenDetection,
batchCheckBalances,
displayNftMedia,
useNftDetection,
useExternalPricingData,
showTestnets,
};
};
}
exports.getGetPreferencesMethodImplementation = getGetPreferencesMethodImplementation;
//# sourceMappingURL=get-preferences.cjs.map