@raydium-io/raydium-sdk-v2 0.0.22-alpha → 0.0.23-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydium-io/raydium-sdk-v2",
3
- "version": "0.0.22-alpha",
3
+ "version": "0.0.23-alpha",
4
4
  "description": "An SDK for building applications on top of Raydium.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "./lib/index.js",
@@ -82,7 +82,9 @@ export default class CpmmModule extends ModuleBase {
82
82
  ...params
83
83
  }: CreateCpmmPoolParam<T>): Promise<MakeTxData<T, { address: CreateCpmmPoolAddress }>> {
84
84
  const payer = ownerInfo.feePayer || this.scope.owner?.publicKey;
85
- const isFront = params.mintA.address < params.mintB.address;
85
+ const isFront = new BN(new PublicKey(params.mintA.address).toBuffer()).lte(
86
+ new BN(new PublicKey(params.mintB.address).toBuffer()),
87
+ );
86
88
 
87
89
  const [mintA, mintB] = isFront ? [params.mintA, params.mintB] : [params.mintB, params.mintA];
88
90
  const [mintAAmount, mintBAmount] = isFront