Skip to content

Commit

Permalink
Merge commit 'de52c422ef31d0b5c08c5e768cdfd17afa603b81' into 2535-imp…
Browse files Browse the repository at this point in the history
…rove-smart-contract-alert-for-different-levels-of-parsed-data
  • Loading branch information
MarkNerdi committed May 27, 2024
2 parents a571664 + de52c42 commit 1eac19e
Show file tree
Hide file tree
Showing 12 changed files with 345 additions and 301 deletions.
29 changes: 15 additions & 14 deletions firefly.diff
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,15 @@
rename packages/desktop/views/dashboard/developer/{index.js => index.ts} (100%)
rename packages/desktop/{lib/routers/enums => views/dashboard/drawers/network-config}/network-config-route.enum.ts (86%)
rename packages/desktop/{components/menu-buttons/ProposalDetailsButton.svelte => views/dashboard/governance/components/ProposalDetailsMenu.svelte} (55%)
rename packages/desktop/{ => views/dashboard/governance}/components/ProposalQuestion.svelte (59%)
rename packages/desktop/{ => views/dashboard/governance}/components/ProposalQuestion.svelte (58%)
rename packages/desktop/views/dashboard/{index.js => index.ts} (77%)
rename packages/desktop/views/dashboard/send-flow/{index.js => index.ts} (100%)
delete mode 100644 packages/desktop/views/dashboard/send-flow/views/SendFlowTemplate.svelte
delete mode 100644 packages/desktop/views/dashboard/send-flow/views/components/DateTimePicker.svelte
delete mode 100644 packages/desktop/views/dashboard/send-flow/views/components/DateTimePickerButton.svelte
delete mode 100644 packages/desktop/views/dashboard/send-flow/views/components/TokenAmountTile.svelte
delete mode 100644 packages/desktop/views/dashboard/send-flow/views/components/TransactionDetails.svelte
delete mode 100644 packages/desktop/views/dashboard/send-flow/views/components/index.js
rename packages/desktop/views/dashboard/send-flow/views/{index.js => index.ts} (100%)
delete mode 100644 packages/desktop/views/dashboard/settings/Settings.svelte
delete mode 100644 packages/desktop/views/dashboard/settings/views/SettingsNavigator.svelte
Expand Down Expand Up @@ -242,8 +243,7 @@
rename packages/desktop/views/{index.js => index.ts} (83%)
rename packages/desktop/views/login/{index.js => index.ts} (100%)
delete mode 100644 packages/desktop/views/login/views/EnterPinView.svelte
delete mode 100644 packages/desktop/views/login/views/index.js
rename packages/{mobile/views/login/views/index.js => desktop/views/login/views/index.ts} (69%)
rename packages/desktop/views/login/views/{index.js => index.ts} (69%)
rename packages/desktop/views/onboarding/{index.js => index.ts} (100%)
rename packages/desktop/views/onboarding/views/create-from-ledger/{index.js => index.ts} (100%)
rename packages/desktop/views/onboarding/views/create-from-ledger/views/{index.js => index.ts} (77%)
Expand Down Expand Up @@ -589,6 +589,7 @@
delete mode 100644 packages/mobile/views/login/views/EnterPinView.svelte
delete mode 100644 packages/mobile/views/login/views/LoadProfileView.svelte
delete mode 100644 packages/mobile/views/login/views/SelectProfileView.svelte
delete mode 100644 packages/mobile/views/login/views/index.js
delete mode 100644 packages/mobile/views/onboarding/OnboardingRouter.svelte
delete mode 100644 packages/mobile/views/onboarding/index.js
delete mode 100644 packages/mobile/views/onboarding/views/CongratulationsView.svelte
Expand Down Expand Up @@ -1103,6 +1104,7 @@
delete mode 100644 packages/shared/lib/core/layer-2/constants/gas-budget.constant.ts
delete mode 100644 packages/shared/lib/core/layer-2/constants/gas-multiplier.constant.ts
delete mode 100644 packages/shared/lib/core/layer-2/enums/allowance.enum.ts
delete mode 100644 packages/shared/lib/core/layer-2/enums/contract-type.enum.ts
delete mode 100644 packages/shared/lib/core/layer-2/enums/destination-network.enum.ts
delete mode 100644 packages/shared/lib/core/layer-2/enums/index.ts
delete mode 100644 packages/shared/lib/core/layer-2/helpers/encodeAddress.ts
Expand All @@ -1115,7 +1117,10 @@
delete mode 100644 packages/shared/lib/core/layer-2/interfaces/layer2-parameters.interface.ts
delete mode 100644 packages/shared/lib/core/layer-2/interfaces/layer2-profile-balance.interface.ts
delete mode 100644 packages/shared/lib/core/layer-2/stores/layer2-balances.store.ts
delete mode 100644 packages/shared/lib/core/layer-2/types/abi.type.ts
delete mode 100644 packages/shared/lib/core/layer-2/types/contract.type.ts
delete mode 100644 packages/shared/lib/core/layer-2/types/evm-transaction-data.type.ts
delete mode 100644 packages/shared/lib/core/layer-2/types/index.ts
delete mode 100644 packages/shared/lib/core/layer-2/types/layer2-metadata.interface.ts
delete mode 100644 packages/shared/lib/core/layer-2/utils/addGasBudget.ts
delete mode 100644 packages/shared/lib/core/layer-2/utils/getAbiForContractType.ts
Expand Down Expand Up @@ -1189,6 +1194,7 @@
delete mode 100644 packages/shared/lib/core/network/enums/explorer-endpoint.enum.ts
delete mode 100644 packages/shared/lib/core/network/enums/index.ts
delete mode 100644 packages/shared/lib/core/network/interfaces/auth.interface.ts
delete mode 100644 packages/shared/lib/core/network/interfaces/block.interface.ts
delete mode 100644 packages/shared/lib/core/network/interfaces/chain-configuration.interface.ts
delete mode 100644 packages/shared/lib/core/network/interfaces/chain-status.interface.ts
delete mode 100644 packages/shared/lib/core/network/interfaces/chain.interface.ts
Expand Down Expand Up @@ -1586,10 +1592,10 @@
rename packages/shared/{ => src}/lib/contexts/governance/stores/selected-participation-event-status.store.ts (64%)
rename packages/shared/{ => src}/lib/contexts/governance/stores/selected-proposal.store.ts (57%)
rename packages/shared/{ => src}/lib/contexts/governance/types/index.ts (100%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/calculateTotalVotesForTrackedParticipations.ts (65%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/calculateTotalVotesForTrackedParticipations.ts (64%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/createProposalFromError.ts (52%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/getActiveParticipation.ts (82%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/getNumberOfActiveProposals.ts (54%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/getNumberOfActiveProposals.ts (53%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/getNumberOfTotalProposals.ts (100%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/getNumberOfVotedProposals.ts (92%)
rename packages/shared/{ => src}/lib/contexts/governance/utils/getNumberOfVotingProposals.ts (94%)
Expand Down Expand Up @@ -1837,23 +1843,22 @@
rename packages/shared/{ => src}/lib/core/i18n/utils/getGroupSeparator.ts (83%)
rename packages/shared/{ => src}/lib/core/i18n/utils/index.ts (100%)
rename packages/shared/{ => src}/lib/core/i18n/utils/replaceCurrencyDecimal.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/abis/erc20.abi.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/abis/erc20.abi.ts (98%)
rename packages/shared/{ => src}/lib/core/layer-2/abis/index.ts (68%)
rename packages/shared/{ => src}/lib/core/layer-2/abis/isc-sandbox.abi.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/abis/isc-sandbox.abi.ts (99%)
rename packages/shared/{ => src}/lib/core/layer-2/classes/simple-buffer.class.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/accounts-contract.constant.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/contract-functions.constant.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/empty-buffer.constants.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/erc20-tokens-poll-interval.constant.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/externally-owned-account-type-id.constant.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/externally-owned-account.constant.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/index.ts (66%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/index.ts (78%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/isc-magic-contract-address.constant.ts (51%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/layer2-tokens-poll-interval.constant.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/target-contracts.constant.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/constants/transfer-allowance.constant.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/enums/abi-type.enum.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/enums/contract-type.enum.ts (77%)
rename packages/shared/{ => src}/lib/core/layer-2/enums/state-mutability-type.enum.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/errors/index.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/errors/layer1-recipient.error.ts (100%)
Expand All @@ -1869,10 +1874,7 @@
rename packages/shared/{lib/core/token/types/native-token-amount.type.ts => src/lib/core/layer-2/interfaces/native-token-amount.interface.ts} (73%)
rename packages/shared/{ => src}/lib/core/layer-2/stores/index.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/tests/parseLayer2MetadataForTransfer.test.ts (63%)
rename packages/shared/{ => src}/lib/core/layer-2/types/abi.type.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/types/contract.type.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/types/evm-transaction-options.type.ts (100%)
rename packages/shared/{ => src}/lib/core/layer-2/types/index.ts (54%)
rename packages/shared/{ => src}/lib/core/layer-2/utils/parseLayer2Metadata.ts (56%)
rename packages/shared/{ => src}/lib/core/ledger/classes/index.ts (100%)
rename packages/shared/{ => src}/lib/core/ledger/constants/ledger-error-locales.constant.ts (100%)
Expand Down Expand Up @@ -1921,7 +1923,6 @@
rename packages/shared/{ => src}/lib/core/network/helpers/getNetworkStatusFromNodeInfo.ts (69%)
rename packages/shared/{ => src}/lib/core/network/helpers/index.ts (100%)
rename packages/shared/{ => src}/lib/core/network/index.ts (100%)
rename packages/shared/{ => src}/lib/core/network/interfaces/block.interface.ts (100%)
rename packages/shared/{ => src}/lib/core/network/interfaces/client-options.interface.ts (54%)
rename packages/shared/{ => src}/lib/core/network/interfaces/connected-chain.interface.ts (100%)
rename packages/shared/{ => src}/lib/core/network/interfaces/evm-addresses.interface.ts (100%)
Expand All @@ -1931,7 +1932,7 @@
rename packages/shared/{ => src}/lib/core/network/interfaces/node-info-response.interface.ts (62%)
rename packages/shared/{ => src}/lib/core/network/interfaces/protocol.interface.ts (62%)
rename packages/shared/{ => src}/lib/core/network/types/network-metadata.type.ts (100%)
rename packages/shared/{ => src}/lib/core/network/types/web3-provider.type.ts (100%)
rename packages/shared/{ => src}/lib/core/network/types/web3-provider.type.ts (54%)
rename packages/shared/{ => src}/lib/core/network/utils/checkNodeUrlValidity.ts (95%)
rename packages/shared/{lib/core/network/utils/getDefaultPersistedNetwork.ts => src/lib/core/network/utils/getDefaultStardustNetwork.ts} (50%)
rename packages/shared/{ => src}/lib/core/network/utils/getEvmTransactionOptions.ts (88%)
Expand Down
41 changes: 41 additions & 0 deletions packages/desktop/public/about.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@font-face {
font-family: 'Silka';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('./assets/fonts/silka/silka-medium-webfont.woff2') format('woff2');
}

body,
html {
width: 100%;
height: 100%;
user-select: none;
-webkit-user-drag: none;
overflow: hidden;
}

body {
margin: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #ffffff;
background-color: #161926;
font-size: 11px;
font-family: 'Silka';
}

#app-icon {
margin-top: 20px;
-webkit-user-drag: none;
}

#app-version {
margin-bottom: 0.05rem;
}

#footer {
margin-bottom: 30px;
}
80 changes: 24 additions & 56 deletions packages/desktop/public/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,36 @@
name="viewport"
content="width=device-width, initial-scale=1, user-scalable=no"
/>
<meta
http-equiv="Content-Security-Policy"
content="
default-src 'self';
connect-src 'self';
img-src 'self';
base-uri 'self';
form-action 'none';
frame-src 'none';
worker-src 'none';
script-src-elem 'self';
script-src-attr 'none';
style-src-elem 'self';
style-src-attr 'none';
object-src 'none';
media-src 'self';
font-src 'self';
manifest-src 'self';
navigate-to 'self';
upgrade-insecure-requests;
"
/>
<title></title>
<style>
@font-face {
font-family: 'Silka';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('./assets/fonts/silka/silka-medium-webfont.woff2') format('woff2');
}

body,

html {
width: 100%;
height: 100%;
user-select: none;
-webkit-user-drag: none;
overflow: hidden;
}

body {
margin: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #ffffff;
background-color: #161926;
font-size: 11px;
font-family: 'Silka';
}

#app-icon {
margin-top: 20px;
-webkit-user-drag: none;
}

#app-version {
margin-bottom: 0.05rem;
}

#footer {
margin-bottom: 30px;
}
</style>
<link rel="stylesheet" href="about.css">
</head>
<body>
<img id="app-icon" alt="App icon" height="70" width="70" />
<h2 id="title"></h2>
<p id="app-version"></p>

<p id="footer"></p>
<!-- https://github.com/electron/electron/issues/2863 -->
<script>var exports = exports || {};</script>

<script>
window.about.getData().then((aboutData) => {
document.getElementById('title').textContent = aboutData.appName
document.getElementById('app-icon').src = aboutData.iconPath
document.getElementById('app-version').textContent = aboutData.version
document.getElementById('footer').textContent = `Bloom Labs Ltd. ${new Date().getFullYear()}`
})
</script>
<script src="about.js"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions packages/desktop/public/about.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// https://github.com/electron/electron/issues/2863
var exports = exports || {}

window.about.getData().then((aboutData) => {
document.getElementById('title').textContent = aboutData.appName
document.getElementById('app-icon').src = aboutData.iconPath
document.getElementById('app-version').textContent = aboutData.version
document.getElementById('footer').textContent = `Bloom Labs Ltd. ${new Date().getFullYear()}`
})
111 changes: 111 additions & 0 deletions packages/desktop/public/error.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
@font-face {
font-family: 'Silka';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('./assets/fonts/silka/silka-medium-webfont.woff2') format('woff2');
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body,
html {
width: 100%;
height: 100%;
user-select: none;
-webkit-user-drag: none;
overflow: hidden;
}

body {
display: flex;
justify-content: stretch;
color: #ffffff;
background-color: #161926;
font-size: 11px;
font-family: 'Silka';
}

a {
color: #b196ef;
}

hr {
width: 100%;
border: 0;
border-top: 1px solid #212537;
margin: 1.5rem 0;
}

button {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border: 0px solid rgb(150, 108, 230);
box-sizing: border-box;
cursor: pointer;
border-radius: 3rem;
padding-left: 1.5rem;
padding-right: 1.5rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
height: 3rem;
background-color: rgb(150, 108, 230);
width: fit-content;
color: white;
font-family: Silka;
font-size: 16px;
}

.content {
flex: 1;
display: flex;
margin: 2rem;
display: flex;
flex-direction: column;
}

#app-icon {
-webkit-user-drag: none;
margin: 1rem 0;
}

#title {
margin: 1rem 0;
}

#diagnostics {
margin: 1rem 0;
}

#details {
margin: 1rem 0;
flex: 1;
overflow-y: auto;
white-space: pre-line;
min-height: 50px;
}

.help {
color: #c4d1e8;
font-size: 0.8rem;
line-height: 1.5rem;
}

::-webkit-scrollbar {
width: 8px;
}

::-webkit-scrollbar-thumb {
background-color: #d8e3f5;
border-radius: 10px;
}

::-webkit-scrollbar-track {
background-color: transparent;
}
Loading

0 comments on commit 1eac19e

Please sign in to comment.