Skip to content

Commit 87ca101

Browse files
authored
Merge pull request #169 from mintlayer/dev
dev-23-06-2024
2 parents c66bca8 + ae7f848 commit 87ca101

File tree

12 files changed

+70
-20
lines changed

12 files changed

+70
-20
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "browser-extension",
3-
"version": "1.2.6",
3+
"version": "1.2.7",
44
"private": true,
55
"dependencies": {
66
"@mintlayer/entropy-generator": "^1.0.2",

public/background-script.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ browser.runtime.onConnect.addListener((port) => {
5050
setTimeout(async () => {
5151
await browser.runtime.sendMessage({
5252
action: 'createDelegate',
53-
data: { pool_id: request.myProperty.message.pool_id },
53+
data: {
54+
pool_id: request.myProperty.message.pool_id,
55+
referral_code: request.myProperty.message.referral_code || '',
56+
},
5457
})
5558
}, 1000)
5659
})

public/background.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ chrome.runtime.onMessageExternal.addListener(function (
6363
setTimeout(function () {
6464
chrome.runtime.sendMessage({
6565
action: 'createDelegate',
66-
data: { pool_id: request.pool_id },
66+
data: {
67+
pool_id: request.pool_id,
68+
referral_code: request.referral_code || '',
69+
},
6770
})
6871
}, 1000)
6972
},

public/manifestDefault.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Mojito - A Mintlayer Wallet",
4-
"version": "1.2.6",
4+
"version": "1.2.7",
55
"short_name": "Mojito",
66
"description": "Mojito is a non-custodial decentralized crypto wallet that lets you send and receive BTC and ML from any other address.",
77
"homepage_url": "https://www.mintlayer.org/",

public/manifestFirefox.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Mojito - A Mintlayer Wallet",
4-
"version": "1.2.6",
4+
"version": "1.2.7",
55
"description": "Mojito is a non-custodial decentralized crypto wallet that lets you send and receive BTC and ML from any other address.",
66
"homepage_url": "https://www.mintlayer.org/",
77
"icons": {

src/components/containers/SendTransaction/SendTransaction.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,20 @@ const SendTransaction = ({
263263
[fee, amountInCrypto],
264264
)
265265

266+
useEffect(
267+
() => {
268+
if (preEnterAddress) {
269+
calculateTotalFee({
270+
to: preEnterAddress,
271+
amount: NumbersHelper.floatStringToNumber(amountInCrypto),
272+
fee,
273+
})
274+
}
275+
},
276+
// eslint-disable-next-line react-hooks/exhaustive-deps
277+
[isFormValid, amountInCrypto, fee, preEnterAddress],
278+
)
279+
266280
useEffect(() => {
267281
const validity = originalAmount && AppInfo.amountRegex.test(originalAmount)
268282
const maxValue = BTC.convertBtcToSatoshi(

src/components/containers/Wallet/Delegation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ const Delegation = ({ delegation }) => {
103103
></div>
104104
<div
105105
style={{
106+
left: '30px',
106107
position: 'absolute',
107108
top: '50%',
108109
marginTop: '-38px',

src/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,18 @@ const App = () => {
104104
state: {
105105
action: 'createDelegate',
106106
pool_id: request.data.pool_id,
107+
referral_code: request.data.referral_code || '',
107108
},
108109
})
109110
return
110111
}
111112
// change route to staking page
112113
navigate('/wallet/Mintlayer/staking/create-delegation', {
113-
state: { action: 'createDelegate', pool_id: request.data.pool_id },
114+
state: {
115+
action: 'createDelegate',
116+
pool_id: request.data.pool_id,
117+
referral_code: request.data.referral_code || '',
118+
},
114119
})
115120
}
116121

src/pages/CreateDelegation/CreateDelegation.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
justify-content: center;
88
align-items: center;
99
height: 100%;
10+
width: 100%;
1011
min-height: 400px;
12+
position: absolute;
13+
z-index: 40;
14+
background-color: rgba(255, 255, 255, 0.8);
1115
}

0 commit comments

Comments
 (0)