Skip to content

Commit

Permalink
Fix proxy deployer marketplace transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
danielailie committed Apr 10, 2024
1 parent f3f3bc4 commit a7c22bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/modules/proxy-deployer/proxy-deployer.abi.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export class ProxyDeployerAbiService {
const args: any[] = [new AddressValue(Address.fromString(process.env.TEMPLATE_MARKETPLACE_ADDRESS))];
if (paymentTokens) {
args.push(
VariadicValue.fromItems(new U32Value(marketplaceFee), List.fromItems(paymentTokens?.map((tag) => BytesValue.fromUTF8(tag)))),
VariadicValue.fromItems(
new U32Value(marketplaceFee),
VariadicValue.fromItems(...paymentTokens?.map((paymentToken) => BytesValue.fromUTF8(paymentToken))),
),
);
}
return contract.methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ describe('Proxy Deployer Abi Service', () => {

describe('deployMarketplaceSc', () => {
it('returns built transaction with right arguments', async () => {
const result = await service.deployMarketplaceSc('erd1dc3yzxxeq69wvf583gw0h67td226gu2ahpk3k50qdgzzym8npltq7ndgha', '10000');
const result = await service.deployMarketplaceSc('erd1qqqqqqqqqqqqqpgq9ac9zvc4ugzrgqaqjqgjdhvxxtx7wu2eu00sxezym3', '1000', [
'WEGLD-a28c59',
]);

const expectedResult = {
chainID: 'T',
Expand Down

0 comments on commit a7c22bd

Please sign in to comment.