Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9ff7dd3
feat(sidepanel): open the wallet in the browser side panel
owlsua Jul 27, 2026
06cf4e7
refactor(chart): drop the unused d3 tooltip from Arc
owlsua Jul 27, 2026
7a24284
feat(wallet): restyle transaction actions as circular icon buttons
owlsua Jul 27, 2026
e20d9db
chore(wallet): remove Transaction.css left over from the CSS modules …
owlsua Jul 27, 2026
bb45711
fix(address-list): scroll the whole table instead of the tbody
owlsua Jul 27, 2026
8586802
style: adapt the layout to the narrow side panel width
owlsua Jul 27, 2026
6dd379b
fix(sidepanel): stop applying the standalone window layout in a wide …
owlsua Jul 31, 2026
7b45443
feat(styles): add font size and spacing design tokens
owlsua Jul 31, 2026
1b266d2
refactor(swap): move font sizes and paddings to design tokens
owlsua Jul 31, 2026
675cf2b
refactor(staking): move font sizes and paddings to design tokens
owlsua Jul 31, 2026
fe6b63a
style(wallet): use gray icons for secondary transaction buttons
owlsua Jul 31, 2026
4d89277
fix(wallet): break long amounts in the transaction details banner
owlsua Jul 31, 2026
02fe267
feat(styles): add a 28px step to the font size scale
owlsua Jul 31, 2026
62b2bc4
refactor(login): move font sizes and paddings to design tokens
owlsua Jul 31, 2026
f109cfa
refactor(create-restore): move font sizes and paddings to design tokens
owlsua Jul 31, 2026
40c1c83
feat(styles): add a display font size token
owlsua Jul 31, 2026
5258e83
refactor(account): move create and restore account styles to design t…
owlsua Jul 31, 2026
f0ebdea
feat(create-restore): show the brand mark at the bottom in the side p…
owlsua Jul 31, 2026
00e9c71
Merge remote-tracking branch 'origin/main' into A-1216249512875644
owlsua Aug 3, 2026
deea031
feat(dashboard): split the asset list into coins and tokens
owlsua Aug 3, 2026
2599ac4
fix(delegation): let long amounts wrap inside the card
owlsua Aug 3, 2026
7ee3de0
style(wallet): unify card corner radius at 25px
owlsua Aug 3, 2026
c946fcf
refactor(loading): extract LoadingScreen and scale it with the viewport
owlsua Aug 3, 2026
07c81d3
style(login): trim the account chooser in the extended view
owlsua Aug 3, 2026
ace3af3
style: soften the background gradient in the extended view
owlsua Aug 3, 2026
b3c738c
refactor(styles): move the extended view breakpoint to 900px
owlsua Aug 3, 2026
97e2c02
chore(release): bump version to 1.6.1
owlsua Aug 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browser-extension",
"version": "1.6.0",
"version": "1.6.1",
"private": true,
"dependencies": {
"@bitcoinerlab/secp256k1": "^1.2.0",
Expand Down
14 changes: 14 additions & 0 deletions public/background-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ let popupWindowId = null
let connectWindowId = null
let isPopupOpening = false

// Firefox has no sidePanel API: open the sidebar when the toolbar icon is clicked
if (
typeof browser !== 'undefined' &&
browser.action &&
browser.sidebarAction &&
browser.sidebarAction.open
) {
browser.action.onClicked.addListener(() => {
browser.sidebarAction.open().catch((error) => {
console.error('[Mintlayer] sidebarAction.open error:', error)
})
})
}

browser.runtime.onConnect.addListener((port) => {
port.onMessage.addListener((msg) => {
if (msg && msg.myProperty && msg.myProperty.message) {
Expand Down
9 changes: 9 additions & 0 deletions public/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
let connectedSites = {}
const pendingResponses = new Map()

// Open the wallet in the browser side panel when the toolbar icon is clicked
if (api.sidePanel && api.sidePanel.setPanelBehavior) {
api.sidePanel
.setPanelBehavior({ openPanelOnActionClick: true })
.catch((error) =>
console.error('[Mintlayer] setPanelBehavior error:', error),
)
}

// Load connected sites from storage
api.storage.local.get(['connectedSites'], (data) => {
if (api.runtime.lastError) {
Expand Down
6 changes: 3 additions & 3 deletions public/index.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@media screen and (min-width: 801px) {
html {
@media screen and (min-width: 901px) {
html.extended-view {
display: flex;
justify-content: center;
padding: 30px 0 30px 0;
height: 100vh;
}

body {
html.extended-view body {
border-radius: 30px;
}
}
10 changes: 6 additions & 4 deletions public/manifestDefault.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Mojito - A Mintlayer Wallet",
"version": "1.6.0",
"version": "1.6.1",
"short_name": "Mojito",
"description": "Mojito is a non-custodial decentralized crypto wallet that lets you send and receive BTC and ML from any other address.",
"homepage_url": "https://www.mintlayer.org/",
Expand All @@ -18,14 +18,16 @@
},
"action": {
"default_icon": "logo192.png",
"default_title": "Mojito",
"default_popup": "index.html"
"default_title": "Mojito"
},
"side_panel": {
"default_path": "index.html"
},
"background": {
"service_worker": "background.js",
"type": "module"
},
"permissions": ["scripting", "storage"],
"permissions": ["scripting", "storage", "sidePanel"],
"content_scripts": [
{
"run_at": "document_start",
Expand Down
8 changes: 6 additions & 2 deletions public/manifestFirefox.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Mojito - A Mintlayer Wallet",
"version": "1.6.0",
"version": "1.6.1",
"description": "Mojito is a non-custodial decentralized crypto wallet that lets you send and receive BTC and ML from any other address.",
"homepage_url": "https://www.mintlayer.org/",
"icons": {
Expand Down Expand Up @@ -34,9 +34,13 @@
"scripts": ["background-script.js"]
},
"action": {
"default_icon": "logo192.png",
"default_title": "Mojito"
},
"sidebar_action": {
"default_icon": "logo192.png",
"default_title": "Mojito",
"default_popup": "index.html"
"default_panel": "index.html"
},
"content_security_policy": {
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'; img-src 'self' data:; style-src 'self' https://fonts.cdnfonts.com https://fonts.googleapis.com https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com https://fonts.cdnfonts.com; style-src-elem 'self' https://fonts.googleapis.com"
Expand Down
52 changes: 52 additions & 0 deletions src/assets/styles/constants.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,58 @@
--border-radius-input: 16px;
--round-size-big: 99px;
--default-font-size: 14px;

--font-size-xs: 11px;
--font-size-sm: 13px;
--font-size-md: 14px;
--font-size-lg: 16px;
--font-size-xl: 18px;
--font-size-2xl: 20px;
--font-size-3xl: 22px;
--font-size-4xl: 24px;
--font-size-5xl: 26px;
--font-size-6xl: 32px;
--font-size-display: 80px;

--space-3xs: 4px;
--space-2xs: 6px;
--space-xs: 8px;
--space-sm: 10px;
--space-md: 12px;
--space-lg: 16px;
--space-xl: 20px;
--space-2xl: 24px;
--space-3xl: 28px;
--space-4xl: 32px;
--space-5xl: 36px;
}

@media screen and (max-width: 500px) {
:root {
--font-size-xs: 10px;
--font-size-sm: 12px;
--font-size-md: 13px;
--font-size-lg: 14px;
--font-size-xl: 16px;
--font-size-2xl: 17px;
--font-size-3xl: 19px;
--font-size-4xl: 20px;
--font-size-5xl: 22px;
--font-size-6xl: 26px;
--font-size-display: 64px;

--space-3xs: 3px;
--space-2xs: 4px;
--space-xs: 6px;
--space-sm: 8px;
--space-md: 10px;
--space-lg: 12px;
--space-xl: 14px;
--space-2xl: 16px;
--space-3xl: 20px;
--space-4xl: 24px;
--space-5xl: 28px;
}
}

@keyframes moveArrowUpRight {
Expand Down
50 changes: 31 additions & 19 deletions src/assets/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,56 +13,61 @@ html {
background:
radial-gradient(
50% 50% at 20% 30%,
rgba(105, 238, 150, 0.4) 0%,
rgba(145, 155, 200, 0.4) 59%,
rgba(105, 238, 150, 0.22) 0%,
rgba(145, 155, 200, 0.16) 59%,
rgba(195, 192, 225, 0) 100%
),
radial-gradient(
50% 50% at 80% 70%,
rgba(105, 238, 150, 0.4) 0%,
rgba(158, 188, 207, 0.4) 59%,
rgba(105, 238, 150, 0.22) 0%,
rgba(158, 188, 207, 0.16) 59%,
rgba(195, 192, 225, 0) 100%
),
radial-gradient(
50% 50% at 50% 50%,
rgba(105, 238, 150, 0.4) 0%,
rgba(145, 155, 200, 0.4) 59%,
rgba(105, 238, 150, 0.18) 0%,
rgba(145, 155, 200, 0.14) 59%,
rgba(195, 192, 225, 0) 100%
),
radial-gradient(
50% 50% at 30% 80%,
rgba(105, 238, 150, 0.4) 0%,
rgba(181, 139, 201, 0.4) 59%,
rgba(105, 238, 150, 0.18) 0%,
rgba(181, 139, 201, 0.14) 59%,
rgba(195, 192, 225, 0) 100%
),
radial-gradient(
50% 50% at 70% 20%,
rgba(105, 238, 150, 0.4) 0%,
rgba(145, 155, 200, 0.4) 59%,
rgba(105, 238, 150, 0.18) 0%,
rgba(145, 155, 200, 0.14) 59%,
rgba(195, 192, 225, 0) 100%
),
rgb(225, 225, 245);
rgb(235, 242, 240);
}

body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
height: 600px;
width: 800px;
height: 100vh;
width: 100%;
min-width: 400px;
background: #f0f2f5;
--page-content-height: auto;
}

@media screen and (min-width: 801px) {
html.extended-view body {
@media screen and (min-width: 901px) {
height: auto;
border-radius: 30px;
width: 111vh;
border-radius: 21px;
width: 112vh;
--page-content-height: 93%;
}
}

#root {
position: relative;
height: 100%;

@media screen and (min-width: 801px) {
@media screen and (min-width: 901px) {
display: flex;
}
}
Expand All @@ -79,10 +84,17 @@ body {
position: relative;
display: flex;
flex-direction: column;
height: 530px;
flex: 1;
height: auto;
min-height: 0;
overflow-y: auto;
}

@media screen and (min-width: 801px) {
html.extended-view .App {
@media screen and (min-width: 901px) {
flex: none;
height: 93%;
overflow-y: hidden;
}
}

Expand Down
59 changes: 2 additions & 57 deletions src/components/basic/Arc/Arc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,7 @@ const createPieGenerator = () =>
.padAngle(0.02)
.sort((a, b) => b.value - a.value)

const createTooltip = () =>
d3
.select('body')
.append('div')
.attr('class', 'chart-tooltip')
.attr('data-testid', 'tooltip-container')
.style('opacity', 0)

const mouseMoveHandle = (tooltip, ev) => {
tooltip.style('left', `${ev.pageX}px`).style('top', `${ev.pageY - 35}px`)
}

const mouseOverHandle = (tooltip, _, item) => {
tooltip
.attr('data-show', 'true')
.transition()
.duration(200)
.style('opacity', 0.9)

tooltip.html(
`${item.data.asset} <br />${item.data.value} ${item.data.valueSymbol} `,
)
}

const mouseOutHandle = (tooltip) => {
tooltip
.attr('data-show', 'false')
.transition()
.duration(500)
.style('opacity', 0)
}

const buildArc = ({
container,
pathData,
arcGenerator,
tooltip,
mouseMoveFn = mouseMoveHandle,
mouseOverFn = mouseOverHandle,
mouseOutFn = mouseOutHandle,
}) => {
const mouseMoveHandleBinded = mouseMoveFn.bind(null, tooltip)
const mouseOverHandleBinded = mouseOverFn.bind(null, tooltip)
const mouseOutHandleBinded = mouseOutFn.bind(null, tooltip)

const buildArc = ({ container, pathData, arcGenerator }) => {
d3.select(container)
.selectAll('path')
.data(pathData)
Expand All @@ -65,17 +21,6 @@ const buildArc = ({
.attr('stroke', 'none')
.attr('fill', (item) => item.data.color)
.attr('data-testid', (item) => `arc-${item.data.asset}-container`)
.on('mouseover', mouseMoveHandleBinded)
.on('mousemove', mouseOverHandleBinded)
.on('mouseout', mouseOutHandleBinded)
}

export {
createPieGenerator,
createArcGenerator,
createTooltip,
buildArc,
mouseMoveHandle,
mouseOverHandle,
mouseOutHandle,
}
export { createPieGenerator, createArcGenerator, buildArc }
Loading
Loading