Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem: no prices in GBP #1377

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/core/src/Currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
AUD = 'AUD',
CNY = 'CNY',
KRW = 'KRW',
GBP = 'GBP',
MONOPOLY = 'MONOPOLY'
}

Expand All @@ -27,6 +28,7 @@
switch (currencySymbol.toUpperCase()) {
case CurrencyCode.RUB: return 'ru-RU';
case CurrencyCode.USD: return 'en-US';
case CurrencyCode.GBP: return 'en-GB';

Check warning on line 31 in packages/core/src/Currency.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/Currency.ts#L31

Added line #L31 was not covered by tests
case CurrencyCode.AUD: return 'en-AU';
case CurrencyCode.EUR: return 'de-DE';
case CurrencyCode.CNY: return 'zh-CN';
Expand Down Expand Up @@ -67,4 +69,4 @@
static create(value: number, currency: string): CurrencyAmount {
return new CurrencyAmount(value * 100, currency)
}
}
}
3 changes: 3 additions & 0 deletions packages/react-app/src/settings/SettingsForm/SettingsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export class SettingsForm extends React.Component<Props, State> {
<MenuItem key="usd" value="usd">
USD
</MenuItem>
<MenuItem key="gbp" value="gbp">
GBP
</MenuItem>
<MenuItem key="cny" value="cny">
CNY
</MenuItem>
Expand Down
26 changes: 26 additions & 0 deletions packages/ui/src/icons/CurrencyGbp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Copyright 2024 Igor Artamonov

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import * as React from 'react';
import SvgIcon, {SvgIconProps} from '@material-ui/core/SvgIcon';

const CurrencyGbp: React.ComponentType<SvgIconProps> = (props) => (
<SvgIcon style={{fill: 'none'}} stroke="currentColor" fill="none" strokeWidth="4" viewBox="0 0 64 64" {...props} >

Check warning on line 20 in packages/ui/src/icons/CurrencyGbp.tsx

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/icons/CurrencyGbp.tsx#L20

Added line #L20 was not covered by tests
<path
d="M12.4531,25A8.7775,8.7775,0,0,0,14,20a10.6,10.6,0,0,0-.18-2H22V16H13.2175c-.0842-.2109-.17-.4194-.2556-.624A9.8586,9.8586,0,0,1,12,11a4.792,4.792,0,0,1,5-5,6.1234,6.1234,0,0,1,5.2222,2.6279l1.5556-1.2558A8.11,8.11,0,0,0,17,4a6.7781,6.7781,0,0,0-7,7,11.65,11.65,0,0,0,1.0559,5H8v2h3.7729A8.209,8.209,0,0,1,12,20c0,2.5234-1.4858,5-3,5v2H24V25Z"/>
</SvgIcon>
);

export default CurrencyGbp;
1 change: 1 addition & 0 deletions packages/ui/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export {default as CurrencyDai} from './CurrencyDai';
export {default as CurrencyEtc} from './CurrencyEtc';
export {default as CurrencyEth} from './CurrencyEth';
export {default as CurrencyUsd} from './CurrencyUsd';
export {default as CurrencyGbp} from './CurrencyGbp';
export {default as CurrencyUsdc} from './CurrencyUsdc';
export {default as CurrencyUsdt} from './CurrencyUsdt';
export {default as Download} from './Download';
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export {
CurrencyEtc,
CurrencyEth,
CurrencyUsd,
CurrencyGbp,
CurrencyUsdt,
Download,
EmoteHappy,
Expand Down
Loading