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

Refactor/publish_to_npm #14

Closed
Closed
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
575a511
docs: update references to pnetwork-association fork
oliviera9 Mar 24, 2023
9e82339
v1.0.5
oliviera9 Mar 24, 2023
e3eb697
chore: run npm audit fix
oliviera9 May 8, 2023
fa8e8ae
test(eosio): improve test coverage
oliviera9 May 8, 2023
bf48c3c
feat(eosio): add possibility to execute custom actions when swapping
oliviera9 May 8, 2023
7635bad
feat(eosio): publish getAmountInEosFormat()
oliviera9 May 8, 2023
c24c249
chore: add commitlint check
oliviera9 May 9, 2023
96f6155
fix(constants): fix Ultra Mainnet chain ID
oliviera9 May 9, 2023
b9bf0e1
Merge pull request #1 from pnetwork-association/feat/eosio-custom-act…
oliviera9 May 10, 2023
2b28eb9
v1.1.0
oliviera9 May 10, 2023
548216f
feat(node): add fees field to AssetInfo
oliviera9 May 25, 2023
d137d7f
feat(swap): add fees calculation for a swap
oliviera9 May 25, 2023
57974dd
Merge pull request #2 from pnetwork-association/feat/fees-management
oliviera9 May 26, 2023
e4180e8
docs(node): add missing points
oliviera9 May 26, 2023
da040ea
v1.2.0
oliviera9 May 26, 2023
d3cbddb
feat: add support to legacy redeem for pTLOS on Ethereum
oliviera9 Jun 12, 2023
90f6a4b
Merge pull request #3 from pnetwork-association/feat/ptlos-on-eth
oliviera9 Jun 13, 2023
ee8c6f9
v1.3.0
oliviera9 Jun 13, 2023
717826d
feat: add LTC chain ID
oliviera9 Jun 16, 2023
55586db
Merge pull request #4 from pnetwork-association/feat/add-ltc-support
oliviera9 Jun 16, 2023
c0d6312
v1.4.0
oliviera9 Jun 16, 2023
bd40237
chore(package.json): add new script for publishing
oliviera9 Jun 20, 2023
57445b8
Merge pull request #5 from pnetwork-association/chore/publish-script
oliviera9 Jun 20, 2023
58b4fdf
chore(*): update dependencies via npm audit fix
oliviera9 Jul 10, 2023
e0c9e6a
feat: add support to legacy pIQ on Ethereum
oliviera9 Jul 10, 2023
842f7ca
Merge pull request #6 from pnetwork-association/feat/everipedia-iq
oliviera9 Jul 11, 2023
f608ace
v1.5.0
oliviera9 Jul 11, 2023
5db3d78
feat: add support to legacy pPNT on xDAI (Gnosis Chain)
oliviera9 Jul 24, 2023
d2b42a3
test(evm): fix failing test
oliviera9 Jul 25, 2023
e8c556f
Merge pull request #8 from pnetwork-association/feat/pnt-on-xdai
oliviera9 Jul 25, 2023
97ce497
v1.6.0
oliviera9 Jul 28, 2023
59be3d8
feat(evm): add support for ETH peg-in
oliviera9 Aug 9, 2023
01b0386
Merge pull request #9 from pnetwork-association/feat/eth-v2
oliviera9 Aug 10, 2023
c6de874
v1.7.0
oliviera9 Aug 10, 2023
061752d
fix(ptokens-evm-asset): fix pltc redeem
envin3 Feb 29, 2024
39573f0
test(ptokens-evm-asset): test pltc redeem
envin3 Feb 29, 2024
45e8c4a
chore(package-lock): fix vulnerabilities
envin3 Feb 29, 2024
fac5a7b
refactor(p.network): rename packages to p.network organization
envin3 Mar 1, 2024
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
Prev Previous commit
Next Next commit
feat: add support to legacy pPNT on xDAI (Gnosis Chain)
oliviera9 committed Jul 24, 2023
commit 5db3d78beab9ea9eeefd61919e434c0a3f945d18
8 changes: 5 additions & 3 deletions packages/ptokens-assets-evm/src/ptokens-evm-asset.ts
Original file line number Diff line number Diff line change
@@ -101,9 +101,11 @@ export class pTokensEvmAsset extends pTokensAsset {
_userData?: Uint8Array
) {
if (
this.assetInfo.chainId === ChainId.EthereumMainnet &&
(this.assetInfo.tokenAddress.toLowerCase() === TokenAddresses.PTLOS_ON_ETH ||
this.assetInfo.tokenAddress.toLowerCase() === TokenAddresses.PIQ_ON_ETH)
(this.assetInfo.chainId === ChainId.EthereumMainnet &&
(this.assetInfo.tokenAddress.toLowerCase() === TokenAddresses.PTLOS_ON_ETH ||
this.assetInfo.tokenAddress.toLowerCase() === TokenAddresses.PIQ_ON_ETH)) ||
(this.assetInfo.chainId === ChainId.XdaiMainnet &&
this.assetInfo.tokenAddress.toLowerCase() === TokenAddresses.PNT_ON_XDAI)
) {
return this.provider.makeContractSend(
{
1 change: 1 addition & 0 deletions packages/ptokens-constants/src/index.ts
Original file line number Diff line number Diff line change
@@ -67,4 +67,5 @@ export enum Network {
export enum TokenAddresses {
PTLOS_ON_ETH = '0x7825e833d495f3d1c28872415a4aee339d26ac88',
PIQ_ON_ETH = '0xa23d33d5e0a61ba81919bfd727c671bb03ab0fea',
PNT_ON_XDAI = '0x0259461eed4d76d4f0f900f9035f6c4dfb39159a',
}
5 changes: 5 additions & 0 deletions packages/ptokens-swap/src/ptokens-swap-builder.ts
Original file line number Diff line number Diff line change
@@ -93,6 +93,11 @@ export class pTokensSwapBuilder {
this.destinationAssets.some((_dest) => _dest.assetInfo.chainId !== ChainId.EosMainnet)
)
return false
else if (
this.sourceAsset.assetInfo.tokenAddress === TokenAddresses.PNT_ON_XDAI &&
this.destinationAssets.some((_dest) => _dest.assetInfo.chainId !== ChainId.EthereumMainnet)
)
return false
else
return this.destinationAssets.every(
(_asset) =>