Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

[xDai] Parametrize Native Coin#1444

Merged
dasanra merged 12 commits intofeature/#1353-xDai-compatibilityfrom
feature/#1418-xDai-parametrize-native-coin
Oct 13, 2020
Merged

[xDai] Parametrize Native Coin#1444
dasanra merged 12 commits intofeature/#1353-xDai-compatibilityfrom
feature/#1418-xDai-parametrize-native-coin

Conversation

@matextrem
Copy link
Contributor

closes #1418

@matextrem matextrem added the Feature 👑 New functionality label Oct 8, 2020
@matextrem matextrem self-assigned this Oct 8, 2020
@github-actions
Copy link

github-actions bot commented Oct 8, 2020

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Oct 8, 2020

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 2 0
Ignored 1 N/A
  • Result: ✅ success

  • Annotations: 2 total


[warning] @typescript-eslint/explicit-module-boundary-types

Require explicit return and argument types on exported functions' and classes' public class methods


Report generated by eslint-plus-action

@ghost
Copy link

ghost commented Oct 8, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Oct 8, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

@fernandomg fernandomg requested a review from Agupane October 9, 2020 13:12
Copy link
Contributor

@fernandomg fernandomg left a comment

Choose a reason for hiding this comment

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

Just suggestions on the code-base related stuff.

I'll test it and complete my feedback.

<TokenSelectField
initialValue={selectedToken}
isValid={tokenAddress && String(tokenAddress).toUpperCase() !== 'ETHER'}
isValid={tokenAddress && String(tokenAddress).toUpperCase() !== nativeCoin.name.toUpperCase()}
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's not related to this... but OMG, that tokenAddress compared to 'ETHER' just blew my mind.

@fernandomg fernandomg added the Critical Only for bugs in released apps, needs to be fixed asap and hotfix needs to be shipped. label Oct 9, 2020
@ghost
Copy link

ghost commented Oct 9, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

Copy link
Contributor

@fernandomg fernandomg left a comment

Choose a reason for hiding this comment

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

Using xDai chain:

image

image

image

Also, added a fix around the generateBatchRequest, there's a type that should remain 'eth', as it's referencing the web3.eth lib

@ghost
Copy link

ghost commented Oct 9, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Oct 9, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

Copy link
Contributor

@nicosampler nicosampler left a comment

Choose a reason for hiding this comment

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

Please remove const { nativeCoin } = getNetworkInfo() inside de componentes for all the ocurrences.

@ghost
Copy link

ghost commented Oct 9, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Oct 9, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

@Agupane
Copy link
Contributor

Agupane commented Oct 13, 2020

Not sure if this comment should be here but:

export const getNetworkInfo = (): NetworkSettings => getConfig()?.network

the ? should be removed, network is not optional, that will let us use this code:

const { nativeCoin } = getNetworkInfo()

Without the risks of network being undefined


const batchIncomingTxsTokenDataRequest = (txs: IncomingTxServiceModel[]) => {
const batch = new web3ReadOnly.BatchRequest()
const { nativeCoin } = getNetworkInfo()
Copy link
Contributor

@Agupane Agupane Oct 13, 2020

Choose a reason for hiding this comment

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

Please check my comment about getNetworkInfo

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's a good point. But this should be added in another PR

@ghost
Copy link

ghost commented Oct 13, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

Daniel Sanchez added 2 commits October 13, 2020 17:20
@Agupane Agupane self-requested a review October 13, 2020 15:27
@ghost
Copy link

ghost commented Oct 13, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

1 similar comment
@ghost
Copy link

ghost commented Oct 13, 2020

Travis automatic deployment:
https://pr1444--safereact.review.gnosisdev.com/app

@dasanra dasanra merged commit f5f57dd into feature/#1353-xDai-compatibility Oct 13, 2020
@dasanra dasanra deleted the feature/#1418-xDai-parametrize-native-coin branch October 13, 2020 15:35
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Critical Only for bugs in released apps, needs to be fixed asap and hotfix needs to be shipped. Feature 👑 New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants