Skip to content

Commit

Permalink
Merge pull request #3035 from near/master
Browse files Browse the repository at this point in the history
Release 2023-04-04
  • Loading branch information
andy-haynes authored Apr 5, 2023
2 parents 7b7f715 + e6b905c commit 4d8f3d0
Show file tree
Hide file tree
Showing 37 changed files with 634 additions and 198 deletions.
38 changes: 19 additions & 19 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@
},
"dependencies": {
"@ledgerhq/hw-transport-u2f": "^5.34.0",
"@near-wallet-selector/account-export": "^7.8.2",
"@near-wallet-selector/coin98-wallet": "^7.8.2",
"@near-wallet-selector/core": "^7.8.2",
"@near-wallet-selector/default-wallets": "^7.8.2",
"@near-wallet-selector/here-wallet": "^7.8.2",
"@near-wallet-selector/ledger": "^7.8.2",
"@near-wallet-selector/math-wallet": "^7.8.2",
"@near-wallet-selector/meteor-wallet": "^7.8.2",
"@near-wallet-selector/modal-ui": "^7.8.2",
"@near-wallet-selector/my-near-wallet": "^7.8.2",
"@near-wallet-selector/near-wallet": "^7.8.2",
"@near-wallet-selector/nearfi": "^7.8.2",
"@near-wallet-selector/neth": "^7.8.2",
"@near-wallet-selector/nightly": "^7.8.2",
"@near-wallet-selector/nightly-connect": "^7.8.2",
"@near-wallet-selector/opto-wallet": "^7.8.2",
"@near-wallet-selector/sender": "^7.8.2",
"@near-wallet-selector/wallet-connect": "^7.8.2",
"@near-wallet-selector/welldone-wallet": "^7.8.2",
"@near-wallet-selector/account-export": "^7.9.2",
"@near-wallet-selector/coin98-wallet": "^7.9.2",
"@near-wallet-selector/core": "^7.9.2",
"@near-wallet-selector/default-wallets": "^7.9.2",
"@near-wallet-selector/here-wallet": "^7.9.2",
"@near-wallet-selector/ledger": "^7.9.2",
"@near-wallet-selector/math-wallet": "^7.9.2",
"@near-wallet-selector/meteor-wallet": "^7.9.2",
"@near-wallet-selector/modal-ui": "^7.9.2",
"@near-wallet-selector/my-near-wallet": "^7.9.2",
"@near-wallet-selector/near-wallet": "^7.9.2",
"@near-wallet-selector/nearfi": "^7.9.2",
"@near-wallet-selector/neth": "^7.9.2",
"@near-wallet-selector/nightly": "^7.9.2",
"@near-wallet-selector/nightly-connect": "^7.9.2",
"@near-wallet-selector/opto-wallet": "^7.9.2",
"@near-wallet-selector/sender": "^7.9.2",
"@near-wallet-selector/wallet-connect": "^7.9.2",
"@near-wallet-selector/welldone-wallet": "^7.9.2",
"@near-wallet/feature-flags": "^0.2.0",
"@reduxjs/toolkit": "1.6.2",
"@sentry/browser": "^6.4.1",
Expand Down
8 changes: 7 additions & 1 deletion packages/frontend/src/components/Routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ import { StakingContainer } from './staking/StakingContainer';
import Swap from './swap/Swap';
import Terms from './terms/Terms';
import '../index.css';
import WalletMigration from './wallet-migration/WalletMigration';
import { getMigrationStep } from './wallet-migration/utils';
import WalletMigration, { WALLET_MIGRATION_VIEWS } from './wallet-migration/WalletMigration';
const { fetchTokenFiatValues, getTokenWhiteList } = tokenFiatValueActions;

const {
Expand Down Expand Up @@ -305,6 +306,11 @@ class Routing extends Component {
handleTransferClick = () => {

this.setState({ openTransferPopup: true });
const migrationStep = getMigrationStep();

if (window?.ExportModal?.show && ![WALLET_MIGRATION_VIEWS.LOG_OUT, WALLET_MIGRATION_VIEWS.VERIFYING].includes(migrationStep)) {
window?.ExportModal?.show();
}
}

closeTransferPopup = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import React from 'react';
import { Translate } from 'react-localize-redux';
import styled from 'styled-components';

import Container from '../../../common/styled/Container.css';
import SetupSeedPhraseForm from '../../SetupSeedPhraseForm';

const AccountIdContainer = styled.div`
overflow: hidden;
text-overflow: ellipsis;
font-weight: 800;
`;

export default ({
passPhrase,
refreshPhrase,
Expand All @@ -16,7 +23,7 @@ export default ({
<Container className='small-centered border' style={style}>
<h1><Translate id='setupSeedPhrase.pageTitle' /></h1>
{
accountId && (<h2><b>{accountId}</b></h2>)
accountId && (<h2><AccountIdContainer>{accountId}</AccountIdContainer></h2>)
}
<h2><Translate id='setupSeedPhrase.pageText' /></h2>
<SetupSeedPhraseForm
Expand Down
28 changes: 26 additions & 2 deletions packages/frontend/src/components/buy/BuyNear.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,32 @@ export function BuyNear({ match, location, history }) {
isWhitelabel ? PayMethods.transak : null,
PayMethods.utorg,
PayMethods.nearPay,
PayMethods.onRamper,
PayMethods.mercuryo,
PayMethods.banxa,
PayMethods.alchemyPay,

].filter((v) => !!v);

const bridgeMethods = [
PayMethods.rainbow,
PayMethods.allbridge,
PayMethods.wormhole,
PayMethods.multichain,
];

const exchangeMethods = [
PayMethods.binance,
PayMethods.binanceUs,
PayMethods.huobi,
PayMethods.kraken,
PayMethods.coinbase,
PayMethods.okx,
PayMethods.bitstamp,
PayMethods.upbit,
PayMethods.coinDCX,
];

return (
<StyledContainer>
<FormButton
Expand All @@ -245,15 +269,15 @@ export function BuyNear({ match, location, history }) {
<FundingCard
title='buyNear.bridgeTokens'
subTitle='buyNear.bridgeSubTitle'
actions={[PayMethods.rainbow]}
actions={bridgeMethods}
/>
<FundingCard title='buyNear.supportedExchanges'
subTitle='buyNear.supportedSubTitle'
link={{
url: 'https://coinmarketcap.com/currencies/near-protocol/markets/',
title: 'buyNear.coinMarketLink'
}}
actions={[PayMethods.okex, PayMethods.binance, PayMethods.huobi, PayMethods.kraken]}
actions={exchangeMethods}
/>
</div>
</StyledContainer>
Expand Down
10 changes: 9 additions & 1 deletion packages/frontend/src/components/buy/FundingType.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ const Button = styled.div`

const WrapperImg = styled.div`
display: flex;
min-width: 110px;
`;

const Image = styled.img`
height: 20px;
max-width: 150px;
${({ blackBackground }) => blackBackground && 'background: black;'}
`;

export const FundingType = ({
Expand All @@ -56,6 +63,7 @@ export const FundingType = ({
track,
disabled,
provideReferrer,
blackBackground = false,
}) => {
return (
<LinkWrap
Expand All @@ -67,7 +75,7 @@ export const FundingType = ({
>
<Wrapper>
<WrapperImg title={name}>
<img src={icon} alt={name} />
<Image src={icon} alt={name} blackBackground={blackBackground} />
</WrapperImg>
{disabled ? null : <Button />}
</Wrapper>
Expand Down
16 changes: 16 additions & 0 deletions packages/frontend/src/components/buy/assets/alchemyPay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions packages/frontend/src/components/buy/assets/allBridge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/frontend/src/components/buy/assets/banxa.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4d8f3d0

Please sign in to comment.