Skip to content
This repository has been archived by the owner on Jul 31, 2021. It is now read-only.

fix: Fix route, balance, amount, token in swap and minutes in transaction deadline window #285

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

fix: Fix route, balance, amount, token in swap and minutes in transaction deadline window #285

wants to merge 14 commits into from

Conversation

memoyil
Copy link
Contributor

@memoyil memoyil commented Mar 16, 2021

Fixes #280

@netlify
Copy link

netlify bot commented Mar 16, 2021

Deploy request for pancake-exchange-v1 rejected.

Rejected with commit 8127a0e

https://docs.netlify.com/configure-builds/environment-variables/#sensitive-variable-policy

@memoyil
Copy link
Contributor Author

memoyil commented Mar 17, 2021

@Chef-Chungus Can you review this please? It would be nice to have these translations

Copy link
Contributor

@RabbitDoge RabbitDoge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the useCallback will break some stuff, other translations seem ok

if (translations.length > 0) {
return getTranslation(translations, translationId, fallback)
}
return (translationId: number, fallback: string, data: ContextData = {}) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should change this, especially removing the callback

Copy link
Contributor Author

@memoyil memoyil Mar 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added callback again. I took that code stub from frontend side. Should we also add it there?

@memoyil memoyil requested a review from RabbitDoge March 19, 2021 09:12
@@ -48,7 +48,9 @@ export function AddRemoveTabs({ adding }: { adding: boolean }) {
<HistoryLink to="/pool">
<StyledArrowLeft />
</HistoryLink>
<ActiveText>{adding ? TranslateString(258, 'Add') : TranslateString(260, 'Remove')} Liquidity</ActiveText>
<ActiveText>{adding ? TranslateString(168, 'Add Liquidity') :
(`${TranslateString(260, 'Remove')} ${TranslateString(262, 'Liquidity')}`)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That king of stuff doesn't work.
Use the id 999 if the translation doesn't exists

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

if (translations.length > 0) {
return getTranslation(translations, translationId, fallback)

const foundTranslation = translations.find((translation) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hachiojidev can you have a look at this change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hachiojidev kindly remainder ☺️

@memoyil memoyil requested a review from ChefKai as a code owner March 22, 2021 10:26
@memoyil memoyil requested a review from RabbitDoge March 22, 2021 10:27
<Text fontSize="14px">Route</Text>
<Text fontSize='14px'>{TranslateString(232, 'Route')}</Text>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This formatting is off. Should be double quotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@memoyil memoyil requested a review from hachiojidev April 7, 2021 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minute translation not working in slippage modal
3 participants