Skip to content

Commit

Permalink
Feature/plt 397 sdk paths [hotfix] (#389)
Browse files Browse the repository at this point in the history
* Refactor SDK paths for most packages to follow similar structure and move them to top level

* Yarn lint

* Yarn lint

* Hotfix for missed tron custodial file

* Fix tx.specs

* Yarn lint

* CELO remove native keyword

Co-authored-by: Jan Dočekal <[email protected]>
  • Loading branch information
jdckl and Jan Dočekal authored Feb 17, 2022
1 parent 49e7711 commit 87f52cb
Show file tree
Hide file tree
Showing 8 changed files with 162 additions and 378 deletions.
38 changes: 13 additions & 25 deletions packages/blockchain/bsc/src/lib/__tests__/bsc.tx.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('BscSDK - tx', () => {
* Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
*/
xdescribe('decimals', () => {
erc20TestFactory.decimals(sdk.transaction.erc20, TEST_DATA.BSC)
erc20TestFactory.decimals(sdk.erc20, TEST_DATA.BSC)
})

describe('prepare', () => {
Expand All @@ -61,60 +61,48 @@ describe('BscSDK - tx', () => {
* Invalid JSON RPC response: "<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n</body>\r\n</html>\r\n"
*/
xdescribe('burnSignedTransaction', () => {
erc20TestFactory.prepare.burnSignedTransaction(sdk.transaction.erc20, TEST_DATA.BSC)
erc20TestFactory.prepare.burnSignedTransaction(sdk.erc20, TEST_DATA.BSC)
})
})
})

describe('erc721', () => {
describe('prepare', () => {
describe('deploySignedTransaction', () => {
erc721TestFactory.prepare.deploySignedTransaction(sdk.transaction.erc721, TEST_DATA.BSC, Currency.BSC)
erc721TestFactory.prepare.deploySignedTransaction(sdk.erc721, TEST_DATA.BSC, Currency.BSC)
})

describe('transferSignedTransaction', () => {
erc721TestFactory.prepare.transferSignedTransaction(
sdk.transaction.erc721,
TEST_DATA.BSC,
Currency.BSC,
)
erc721TestFactory.prepare.transferSignedTransaction(sdk.erc721, TEST_DATA.BSC, Currency.BSC)
})

describe('mintSignedTransaction', () => {
erc721TestFactory.prepare.mintSignedTransaction(sdk.transaction.erc721, TEST_DATA.BSC, Currency.BSC)
erc721TestFactory.prepare.mintSignedTransaction(sdk.erc721, TEST_DATA.BSC, Currency.BSC)
})

describe('burnSignedTransaction', () => {
erc721TestFactory.prepare.burnSignedTransaction(sdk.transaction.erc721, TEST_DATA.BSC, Currency.BSC)
erc721TestFactory.prepare.burnSignedTransaction(sdk.erc721, TEST_DATA.BSC, Currency.BSC)
})

describe('mintCashbackSignedTransaction', () => {
erc721TestFactory.prepare.mintCashbackSignedTransaction(
sdk.transaction.erc721,
TEST_DATA.BSC,
Currency.BSC,
)
erc721TestFactory.prepare.mintCashbackSignedTransaction(sdk.erc721, TEST_DATA.BSC, Currency.BSC)
})

describe('mintMultipleCashbackSignedTransaction', () => {
erc721TestFactory.prepare.mintMultipleCashbackSignedTransaction(
sdk.transaction.erc721,
sdk.erc721,
TEST_DATA.BSC,
Currency.BSC,
)
})

describe('mintMultipleSignedTransaction', () => {
erc721TestFactory.prepare.mintMultipleSignedTransaction(
sdk.transaction.erc721,
TEST_DATA.BSC,
Currency.BSC,
)
erc721TestFactory.prepare.mintMultipleSignedTransaction(sdk.erc721, TEST_DATA.BSC, Currency.BSC)
})

describe('updateCashbackForAuthorSignedTransaction', () => {
erc721TestFactory.prepare.updateCashbackForAuthorSignedTransaction(
sdk.transaction.erc721,
sdk.erc721,
TEST_DATA.BSC,
Currency.BSC,
)
Expand Down Expand Up @@ -221,7 +209,7 @@ describe('BscSDK - tx', () => {
describe('prepare', () => {
describe('smart contract write method invocation', () => {
smartContractTestFactory.prepare.smartContractWriteMethodInvocationTransaction(
sdk.transaction.smartContract,
sdk.smartContract,
TEST_DATA.BSC,
)
})
Expand All @@ -230,7 +218,7 @@ describe('BscSDK - tx', () => {
xdescribe('send', () => {
describe('smart contract read method invocation', () => {
smartContractTestFactory.send.smartContractReadMethodInvocationTransaction(
sdk.transaction.smartContract,
sdk.smartContract,
TEST_DATA.BSC,
)
})
Expand All @@ -241,7 +229,7 @@ describe('BscSDK - tx', () => {
describe('prepare', () => {
describe('smart contract write method invocation', () => {
custodialTestFactory.prepare.generateCustodialWalletSignedTransaction(
sdk.transaction.custodial,
sdk.custodial,
TEST_DATA.BSC,
'BSC',
)
Expand Down
Loading

0 comments on commit 87f52cb

Please sign in to comment.