mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 23:58:06 +01:00
85f260c22d
* update dialog templates to use custom UI * add TODO comments * Fix showDialog hook and destructuring * Regen LavaMoat policies * Re-add legacy snap confirmation for now * Fix circular dependency issue * Revert change to token-util * Fix lint Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
39 lines
882 B
JavaScript
39 lines
882 B
JavaScript
import { mapToTemplate } from '../../../../../components/app/flask/snap-ui-renderer';
|
|
|
|
function getValues(pendingApproval, t, actions) {
|
|
const {
|
|
snapName,
|
|
requestData: { content },
|
|
} = pendingApproval;
|
|
|
|
return {
|
|
content: [
|
|
{
|
|
element: 'Box',
|
|
key: 'snap-dialog-content-wrapper',
|
|
props: {
|
|
marginLeft: 4,
|
|
marginRight: 4,
|
|
},
|
|
children: {
|
|
element: 'SnapDelineator',
|
|
key: 'snap-delineator',
|
|
props: {
|
|
snapName,
|
|
},
|
|
// TODO: Replace with SnapUIRenderer when we don't need to inject the input manually.
|
|
children: mapToTemplate(content),
|
|
},
|
|
},
|
|
],
|
|
submitText: t('ok'),
|
|
onSubmit: () => actions.resolvePendingApproval(pendingApproval.id, null),
|
|
};
|
|
}
|
|
|
|
const snapAlert = {
|
|
getValues,
|
|
};
|
|
|
|
export default snapAlert;
|