-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6692 from vegaprotocol/chore/release-v0.26.19
chore(trading,governance,explorer): release v0.26.19
- Loading branch information
Showing
61 changed files
with
1,451 additions
and
1,513 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
apps/explorer/src/app/components/price-in-asset/price-in-asset.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import { render } from '@testing-library/react'; | ||
import PriceInAsset from './price-in-asset'; | ||
|
||
function renderComponent(price: string, decimals: number, symbol: string) { | ||
return ( | ||
<MemoryRouter> | ||
<PriceInAsset price={price} decimals={decimals} symbol={symbol} /> | ||
</MemoryRouter> | ||
); | ||
} | ||
describe('Price in Market component', () => { | ||
it('Renders the raw price before there is no market data', () => { | ||
const res = render(renderComponent('100', 8, 'USDT')); | ||
expect(res.getByText('0.000001')).toBeInTheDocument(); | ||
}); | ||
}); |
29 changes: 29 additions & 0 deletions
29
apps/explorer/src/app/components/price-in-asset/price-in-asset.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { addDecimalsFormatNumber } from '@vegaprotocol/utils'; | ||
|
||
export type DecimalSource = 'MARKET' | 'SETTLEMENT_ASSET'; | ||
|
||
export type PriceInMarketProps = { | ||
price: string; | ||
decimals: number; | ||
symbol: string; | ||
}; | ||
|
||
/** | ||
* An alternative to PriceInMarket for when you need the price | ||
* with an asset's decimal places. | ||
*/ | ||
export const PriceInAsset = ({ | ||
price, | ||
decimals, | ||
symbol, | ||
}: PriceInMarketProps) => { | ||
const label = addDecimalsFormatNumber(price, decimals); | ||
|
||
return ( | ||
<label> | ||
<span>{label}</span> <span>{symbol}</span> | ||
</label> | ||
); | ||
}; | ||
|
||
export default PriceInAsset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
apps/explorer/src/app/routes/assets/components/__generated__/Asset-Markets.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
apps/governance/src/components/vega-wallet/__generated__/Delegations.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.