Skip to content

Commit

Permalink
Merge pull request #6538 from vegaprotocol/chore/release-v0.26.10
Browse files Browse the repository at this point in the history
chore(trading,governance,explorer): release v0.26.10
  • Loading branch information
mattrussell36 authored Jun 13, 2024
2 parents 54ec05c + 840e983 commit 7c040e5
Show file tree
Hide file tree
Showing 163 changed files with 3,905 additions and 1,329 deletions.
2 changes: 1 addition & 1 deletion apps/governance-e2e/src/integration/view/wallet-vega.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ context(
.should('be.visible')
.and(
'have.text',
'Get the Vega WalletGet MetaMask>_Command Line WalletView as public key'
'Get the Vega WalletGet MetaMask>_CLI/Desktop WalletView as public key'
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion apps/governance/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const Web3Container = ({
ETH_LOCAL_PROVIDER_URL,
ETH_WALLET_MNEMONIC
),
Number(chainId)
[Number(chainId)]
);
}
}, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const EthConnectPrompt = () => {
return (
<Button
variant="default"
onClick={open}
onClick={() => open()}
fill={true}
data-testid="connect-to-eth-btn"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const EthWalletContainer = ({
if (!account) {
return (
<div className="w-full text-center">
<Button onClick={open}>{t('connectEthWallet')}</Button>
<Button onClick={() => open()}>{t('connectEthWallet')}</Button>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/governance/src/components/eth-wallet/eth-wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export const EthWallet = () => {
) : (
<Button
fill={true}
onClick={open}
onClick={() => open()}
data-testid="connect-to-eth-wallet-button"
>
{t('connectEthWalletToAssociate')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,24 @@ export const TelemetryDialog = () => {
<div className="flex items-center mt-10 gap-4">
<Button
onClick={() => {
setTelemetryAccepted(false);
setTelemetryAccepted(true);
close();
}}
variant="default"
data-testid="do-not-share-data-button"
variant="primary"
data-testid="share-data-button"
>
{t('NoThanks')}
{telemetryAccepted ? t('ContinueSharingData') : t('ShareData')}
</Button>

<Button
onClick={() => {
setTelemetryAccepted(true);
setTelemetryAccepted(false);
close();
}}
variant="primary"
data-testid="share-data-button"
variant="default"
data-testid="do-not-share-data-button"
>
{telemetryAccepted ? t('ContinueSharingData') : t('ShareData')}
{t('NoThanks')}
</Button>
</div>
</Dialog>
Expand Down
8 changes: 6 additions & 2 deletions apps/governance/src/lib/web3-connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ export const createConnectors = (providerUrl: string, chainId: number) => {
: null,
initializeMetaMaskConnector(),
initializeCoinbaseConnector(providerUrl),
initializeWalletConnector(WALLETCONNECT_PROJECT_ID, chainId, providerUrl),
initializeWalletConnectLegacyConnector(chainId, providerUrl),
initializeWalletConnector(WALLETCONNECT_PROJECT_ID, {
[chainId]: providerUrl,
}),
initializeWalletConnectLegacyConnector({
[chainId]: providerUrl,
}),
].filter(Boolean) as unknown as [Connector, Web3ReactHooks][];
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ query ProposalAsset($assetId: ID!) {
source {
... on ERC20 {
contractAddress
chainId
}
}
}
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jest.mock('@vegaprotocol/web3', () => {
...orig,
useBridgeContract: jest.fn().mockReturnValue({
list_asset: jest.fn(),
isNewContract: true,
}),
useEthereumTransaction: jest.fn(() => mockUseEthTx),
};
Expand Down Expand Up @@ -55,6 +54,7 @@ const DEFAULT__ASSET: ProposalAssetQuery = {
source: {
__typename: 'ERC20',
contractAddress: '0x0',
chainId: '1',
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {
import { EthWalletContainer } from '../../../../components/eth-wallet-container';

const useListAsset = (assetId: string) => {
const bridgeContract = useBridgeContract();

const transaction = useEthereumTransaction<CollateralBridge, 'list_asset'>(
bridgeContract,
'list_asset'
);
const {
data,
loading: loadingAsset,
Expand All @@ -26,6 +20,13 @@ const useListAsset = (assetId: string) => {
},
});

const bridgeContract = useBridgeContract();

const transaction = useEthereumTransaction<CollateralBridge, 'list_asset'>(
bridgeContract,
'list_asset'
);

const {
data: assetData,
loading: loadingBundle,
Expand Down
8 changes: 6 additions & 2 deletions apps/multisig-signer/src/app/lib/web3-connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export const createConnectors = (providerUrl: string, chainId: number) => {
return [
initializeMetaMaskConnector(),
initializeCoinbaseConnector(providerUrl),
initializeWalletConnector(WALLETCONNECT_PROJECT_ID, chainId, providerUrl),
initializeWalletConnectLegacyConnector(chainId, providerUrl),
initializeWalletConnector(WALLETCONNECT_PROJECT_ID, {
[chainId]: providerUrl,
}),
initializeWalletConnectLegacyConnector({
[chainId]: providerUrl,
}),
].filter(Boolean) as unknown as [Connector, Web3ReactHooks][];
};
4 changes: 3 additions & 1 deletion apps/trading/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NX_SENTRY_DSN=https://[email protected]/
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet1/vegawallet-stagnet1.toml
NX_VEGA_ENV=STAGNET1
NX_VEGA_EXPLORER_URL=https://explorer.stagnet1.vega.rocks
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}

NX_VEGA_TOKEN_URL=https://governance.stagnet1.vega.rocks
NX_VEGA_WALLET_URL=http://localhost:1789
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
Expand Down Expand Up @@ -35,6 +35,7 @@ NX_CROSS_CHAIN_DEPOSITS_ENABLED=true
NX_SUCCESSOR_MARKETS=true
NX_STOP_ORDERS=true
NX_TAKE_PROFIT_STOP_LOSS=true
NX_SWAP=true
NX_TWAP_REWARDS=true
NX_ISOLATED_MARGIN=true
NX_ICEBERG_ORDERS=true
Expand All @@ -49,6 +50,7 @@ NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket
NX_CHARTING_LIBRARY_PATH=https://assets.vega.community/trading-view-bundle/v0.0.1/
NX_CHARTING_LIBRARY_HASH=PDjWaqPFndDp+LCvqbKvntWriaqNzNpZ5i9R/BULzCg=

NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}
NX_SQUID_INTEGRATOR_ID=vega-swap-widget
NX_SQUID_API_URL=https://api.squidrouter.com
NX_CROSS_CHAIN_DEPOSITS_ENABLED=true
5 changes: 4 additions & 1 deletion apps/trading/.env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NX_SENTRY_DSN=https://[email protected]/
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/mainnet1.toml
NX_VEGA_ENV=MAINNET
NX_VEGA_EXPLORER_URL=https://explorer.vega.xyz
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}

NX_VEGA_TOKEN_URL=https://governance.vega.xyz
NX_VEGA_WALLET_URL=http://localhost:1789
NX_VEGA_DOCS_URL=https://docs.vega.xyz/mainnet
Expand All @@ -23,6 +23,7 @@ NX_VEGA_CHAIN_ID=vega-mainnet-0011
NX_SUCCESSOR_MARKETS=true
NX_STOP_ORDERS=true
NX_TAKE_PROFIT_STOP_LOSS=true
NX_TWAP_REWARDS=false
NX_ISOLATED_MARGIN=true
NX_ICEBERG_ORDERS=true
NX_METAMASK_SNAPS=true
Expand All @@ -34,3 +35,5 @@ NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket

NX_CHARTING_LIBRARY_PATH=https://assets.vega.community/trading-view-bundle/v0.0.1/
NX_CHARTING_LIBRARY_HASH=PDjWaqPFndDp+LCvqbKvntWriaqNzNpZ5i9R/BULzCg=

NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}
5 changes: 4 additions & 1 deletion apps/trading/.env.mainnet-mirror
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NX_SENTRY_DSN=https://[email protected]/
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/mainnet-mirror/vegawallet-mainnet-mirror.toml
NX_VEGA_ENV=MAINNET_MIRROR
NX_VEGA_EXPLORER_URL=https://explorer.mainnet-mirror.vega.rocks
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\",\"MAINNET_MIRROR\":\"https://trading.mainnet-mirror.vega.rocks\"}

NX_VEGA_TOKEN_URL=https://governance.mainnet-mirror.vega.rocks
NX_VEGA_WALLET_URL=http://localhost:1789
NX_VEGA_DOCS_URL=https://docs.vega.xyz/mainnet
Expand All @@ -22,6 +22,7 @@ NX_VEGA_CHAIN_ID=vega-mainnet-mirror-202306231148
NX_SUCCESSOR_MARKETS=true
NX_STOP_ORDERS=true
NX_TAKE_PROFIT_STOP_LOSS=true
NX_TWAP_REWARDS=false
NX_ISOLATED_MARGIN=true
NX_ICEBERG_ORDERS=true
NX_METAMASK_SNAPS=true
Expand All @@ -33,3 +34,5 @@ NX_CHARTING_LIBRARY_HASH=PDjWaqPFndDp+LCvqbKvntWriaqNzNpZ5i9R/BULzCg=

NX_TENDERMINT_URL=https://be.mainnet-mirror.vega.rocks
NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.rocks/websocket

NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\",\"MAINNET_MIRROR\":\"https://trading.mainnet-mirror.vega.rocks\"}
5 changes: 4 additions & 1 deletion apps/trading/.env.stagnet1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NX_SENTRY_DSN=https://[email protected]/
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet1/vegawallet-stagnet1.toml
NX_VEGA_ENV=STAGNET1
NX_VEGA_EXPLORER_URL=https://explorer.stagnet1.vega.rocks
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}

NX_VEGA_TOKEN_URL=https://governance.stagnet1.vega.rocks
NX_VEGA_WALLET_URL=http://localhost:1789
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
Expand All @@ -23,6 +23,7 @@ NX_VEGA_CHAIN_ID=vega-stagnet1-202307191148
NX_SUCCESSOR_MARKETS=true
NX_STOP_ORDERS=true
NX_TAKE_PROFIT_STOP_LOSS=true
NX_TWAP_REWARDS=true
NX_ISOLATED_MARGIN=true
NX_ICEBERG_ORDERS=true
# NX_PRODUCT_PERPETUALS
Expand All @@ -32,3 +33,5 @@ NX_TEAM_COMPETITION=true

NX_CHARTING_LIBRARY_PATH=https://assets.vega.community/trading-view-bundle/v0.0.1/
NX_CHARTING_LIBRARY_HASH=PDjWaqPFndDp+LCvqbKvntWriaqNzNpZ5i9R/BULzCg=

NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}
5 changes: 4 additions & 1 deletion apps/trading/.env.testnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NX_SENTRY_DSN=https://[email protected]/
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/fairground/vegawallet-fairground.toml
NX_VEGA_ENV=TESTNET
NX_VEGA_EXPLORER_URL=https://explorer.fairground.wtf
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}

NX_VEGA_TOKEN_URL=https://governance.fairground.wtf
NX_VEGA_WALLET_URL=http://localhost:1789
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
Expand All @@ -24,6 +24,7 @@ NX_VEGA_CHAIN_ID=vega-fairground-202305051805
NX_SUCCESSOR_MARKETS=true
NX_STOP_ORDERS=true
NX_TAKE_PROFIT_STOP_LOSS=true
NX_TWAP_REWARDS=true
NX_ISOLATED_MARGIN=true
NX_ICEBERG_ORDERS=true
NX_METAMASK_SNAPS=true
Expand All @@ -35,3 +36,5 @@ NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket

NX_CHARTING_LIBRARY_PATH=https://assets.vega.community/trading-view-bundle/v0.0.1/
NX_CHARTING_LIBRARY_HASH=PDjWaqPFndDp+LCvqbKvntWriaqNzNpZ5i9R/BULzCg=

NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}
5 changes: 4 additions & 1 deletion apps/trading/.env.validators-testnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NX_SENTRY_DSN=https://[email protected]/
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.toml
NX_VEGA_ENV=VALIDATORS_TESTNET
NX_VEGA_EXPLORER_URL=https://explorer.validators-testnet.vega.rocks
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\",\"TESTNET\":\"https://console.fairground.wtf\"}

NX_VEGA_TOKEN_URL=https://governance.validators-testnet.vega.rocks
NX_VEGA_WALLET_URL=http://localhost:1789
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
Expand All @@ -23,6 +23,7 @@ NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/m
NX_SUCCESSOR_MARKETS=true
NX_STOP_ORDERS=true
NX_TAKE_PROFIT_STOP_LOSS=true
NX_TWAP_REWARDS=false
NX_ISOLATED_MARGIN=true
NX_ICEBERG_ORDERS=true
# NX_PRODUCT_PERPETUALS
Expand All @@ -31,3 +32,5 @@ NX_REFERRALS=false

NX_TENDERMINT_URL=https://tm.be.validators-testnet.vega.rocks
NX_TENDERMINT_WEBSOCKET_URL=wss://be.validators-testnet.vega.xyz/websocket

NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\",\"TESTNET\":\"https://console.fairground.wtf\"}
14 changes: 11 additions & 3 deletions apps/trading/client-pages/portfolio/portfolio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { usePageTitle } from '../../lib/hooks/use-page-title';
import { DepositContainer } from '@vegaprotocol/deposits';
import { TransferContainer } from '@vegaprotocol/accounts';
import { WithdrawContainer } from '../../components/withdraw-container';
import { SwapContainer } from '../../components/swap/swap-container';
import { SquidContainer } from '../../components/squid-container';
import { useFeatureFlags } from '@vegaprotocol/environment';

Expand Down Expand Up @@ -159,9 +160,7 @@ const PortfolioActionTabs = () => {
<Tab id="deposit" name={t('Deposit')}>
<ErrorBoundary feature="portfolio-deposit">
<div className="p-2">
<p className="text-sm mb-4">
{t('Deposit from your Ethereum wallet')}
</p>
<p className="text-sm mb-4">{t('Deposit from your wallet')}</p>
<DepositContainer />
</div>
</ErrorBoundary>
Expand All @@ -180,6 +179,15 @@ const PortfolioActionTabs = () => {
</div>
</ErrorBoundary>
</Tab>
{flags.SWAP ? (
<Tab id="swap" name={t('Swap')}>
<ErrorBoundary feature="assets-swap">
<div className="p-4">
<SwapContainer />
</div>
</ErrorBoundary>
</Tab>
) : null}
{flags.CROSS_CHAIN_DEPOSITS_ENABLED && flags.CROSS_CHAIN_DEPOSITS ? (
<Tab id="cross-chain-deposit" name={t('Cross chain deposit')}>
<ErrorBoundary feature="portfolio-transfer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ViewType, useSidebar } from '../sidebar';
import { useMarketClickHandler } from '../../lib/hooks/use-market-click-handler';
import { useGetCurrentRouteId } from '../../lib/hooks/use-get-current-route-id';
import { useT } from '../../lib/use-t';
import { usePersistentDepositStore } from '@vegaprotocol/deposits';

export const AccountsContainer = ({
pinnedAssets,
Expand All @@ -26,7 +25,6 @@ export const AccountsContainer = ({
const { open: openAssetDetailsDialog } = useAssetDetailsDialogStore();
const currentRouteId = useGetCurrentRouteId();
const setViews = useSidebar((store) => store.setViews);
const setDepositAsset = usePersistentDepositStore((store) => store.saveValue);

const gridStore = useAccountStore((store) => store.gridStore);
const updateGridStore = useAccountStore((store) => store.updateGridStore);
Expand All @@ -53,17 +51,8 @@ export const AccountsContainer = ({
<AccountManager
partyId={pubKey}
onClickAsset={onClickAsset}
onClickWithdraw={(assetId) => {
setViews({ type: ViewType.Withdraw, assetId }, currentRouteId);
}}
onClickDeposit={(assetId) => {
onClickDeposit={() => {
setViews({ type: ViewType.Deposit }, currentRouteId);
if (assetId) {
setDepositAsset({ assetId });
}
}}
onClickTransfer={(assetId) => {
setViews({ type: ViewType.Transfer, assetId }, currentRouteId);
}}
onMarketClick={onMarketClick}
isReadOnly={isReadOnly}
Expand Down
Loading

0 comments on commit 7c040e5

Please sign in to comment.