Skip to content

Commit 5a13348

Browse files
committed
add 1155 case in setDefaultRoyaltyInfo
1 parent a0417c0 commit 5a13348

File tree

1 file changed

+6
-2
lines changed
  • apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components

1 file changed

+6
-2
lines changed

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ function RoyaltyModule(props: ModuleInstanceProps) {
117117
(values.recipient !== defaultRoyaltyRecipient ||
118118
Number(values.bps) !== defaultRoyaltyBps)
119119
) {
120-
const setSaleConfigTx = RoyaltyERC721.setDefaultRoyaltyInfo({
120+
const setDefaultRoyaltyInfo = isErc721
121+
? RoyaltyERC721.setDefaultRoyaltyInfo
122+
: RoyaltyERC1155.setDefaultRoyaltyInfo;
123+
124+
const setSaleConfigTx = setDefaultRoyaltyInfo({
121125
contract: contract,
122126
royaltyRecipient: values.recipient,
123127
royaltyBps: Number(values.bps),
@@ -129,7 +133,7 @@ function RoyaltyModule(props: ModuleInstanceProps) {
129133
});
130134
}
131135
},
132-
[contract, ownerAccount, defaultRoyaltyInfoQuery.data],
136+
[contract, ownerAccount, defaultRoyaltyInfoQuery.data, isErc721],
133137
);
134138

135139
return (

0 commit comments

Comments
 (0)