Skip to content

Commit

Permalink
Merge pull request #205 from mintlayer/dev
Browse files Browse the repository at this point in the history
Dev-04-03-2025
  • Loading branch information
owlsua authored Mar 4, 2025
2 parents c420615 + 2632f77 commit 73181fe
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 13 deletions.
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.3.6",
"version": "1.3.7",
"private": true,
"dependencies": {
"@bitcoin-js/tiny-secp256k1-asmjs": "^2.2.3",
Expand Down
2 changes: 1 addition & 1 deletion 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.3.6",
"version": "1.3.7",
"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 Down
2 changes: 1 addition & 1 deletion 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.3.6",
"version": "1.3.7",
"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
14 changes: 14 additions & 0 deletions src/components/composed/Balance/Balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ const Balance = ({ balance, balanceLocked, exchangeRate, walletType }) => {
if (walletType.name === 'Bitcoin') {
return 'BTC'
}
if (
!tokenBalances ||
!tokenBalances[walletType.name] ||
!tokenBalances[walletType.name].token_info
) {
return 'TKN'
}
return tokenBalances[walletType.name].token_info.token_ticker.string
}

Expand All @@ -42,6 +49,13 @@ const Balance = ({ balance, balanceLocked, exchangeRate, walletType }) => {
if (walletType.name === 'Bitcoin') {
return <BtcLogo />
}
if (
!tokenBalances ||
!tokenBalances[walletType.name] ||
!tokenBalances[walletType.name].token_info
) {
return <TokenLogoRound text={'TKN'} />
}
return (
<TokenLogoRound
text={tokenBalances[
Expand Down
2 changes: 1 addition & 1 deletion src/components/composed/Navigation/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const Navigation = ({ customNavigation }) => {
Logout
</li>
)}
<span className="slider-version">v1.3.6</span>
<span className="slider-version">v1.3.7</span>
</ul>
</>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ const SendTransaction = ({
</CenteredLayout>
</>
)}

{/* TODO: remove popup */}
{openSendFundConfirmation && (
<PopUp
setOpen={setPopupState}
Expand Down
3 changes: 2 additions & 1 deletion src/contexts/MintlayerProvider/MintlayerProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ const MintlayerProvider = ({ value: propValue, children }) => {
setLockedBalance(0)
setTokenBalances({})
setUtxos([])
setMlDelegationList([])
// TODO: eneable this when after remove popup confirmation
// setMlDelegationList([])
setMlDelegationsBalance(0)
}

Expand Down
4 changes: 3 additions & 1 deletion src/hooks/UseWalletInfo/useMlWalletInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const useMlWalletInfo = (addresses, token) => {
const nativecoins = ['Mintlayer', 'Bitcoin']

if (token && !nativecoins.includes(token)) {
const tokenBalance = tokenBalances[token].balance || 0
const tokenBalance = tokenBalances[token]?.balance
? tokenBalances[token].balance
: 0

return {
transactions: transactions.filter((tx) => tx.token_id === token),
Expand Down
2 changes: 1 addition & 1 deletion src/pages/CreateRestore/CreateRestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const CreateRestorePage = () => {
className="footnote-version"
data-testid="footnote-name"
>
v1.3.6
v1.3.7
</small>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/DelegationWithdraw/DelegationWithdraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const DelegationWithdrawPage = () => {
)

const delegationBalance = Format.BTCValue(
MLHelpers.getAmountInCoins(currentDelegationInfo.balance),
MLHelpers.getAmountInCoins(currentDelegationInfo?.balance || 0),
)

const maxValueToken = delegationBalance - totalFeeCrypto
Expand Down Expand Up @@ -103,7 +103,7 @@ const DelegationWithdrawPage = () => {
? mlPrivKeys.mlMainnetPrivateKey
: mlPrivKeys.mlTestnetPrivateKey

const walletPrivKeys = await ML.getWalletPrivKeysList(
const walletPrivKeys = ML.getWalletPrivKeysList(
privKey,
networkType,
changeAddressesLength,
Expand Down
15 changes: 14 additions & 1 deletion src/pages/SendTransaction/SendTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ const SendTransactionPage = () => {
if (walletType.name === 'Bitcoin') {
return 'BTC'
}
if (
!tokenBalances ||
!tokenBalances[walletType.name] ||
!tokenBalances[walletType.name].token_info
) {
return 'TKN'
}
return tokenBalances[walletType.name].token_info.token_ticker.string
}

Expand Down Expand Up @@ -238,7 +245,13 @@ const SendTransactionPage = () => {
return result
}

const goBackToWallet = () => navigate('/wallet/' + walletType.name)
const goBackToWallet = () => {
if (walletType.tokenId) {
navigate('/')
} else {
navigate('/wallet/' + walletType.name)
}
}

return (
<>
Expand Down

0 comments on commit 73181fe

Please sign in to comment.