Skip to content

Commit 4788a18

Browse files
committed
fix createcoin wrong factory address comparison
1 parent 97c8257 commit 4788a18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/coins-sdk/src/actions/createCoin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ export async function createCoin({
175175

176176
// Sanity check that the call is for the correct factory contract
177177
if (!isAddressEqual(createContentCall.to, coinFactoryAddressForChain)) {
178-
throw new Error("Creator coin is not supported for this SDK version");
178+
const extractedFactoryAddress = '0x' + createContentCall.data.substring(34, 74);
179+
if (!isAddressEqual(extractedFactoryAddress as Address, coinFactoryAddressForChain)) {
180+
throw new Error("Creator coin is not supported for this SDK version");
181+
}
179182
}
180183

181184
// Sanity check to ensure no buy orders are sent with there parameters

0 commit comments

Comments
 (0)