-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: transaction.providerData.tx.sign #48
Comments
@ndtr2000 Would you sharing how you are initializing Dexter with the LucidProvider? |
This is how I did @Sluder const dexterConfig: DexterConfig = {
shouldFetchMetadata: true,
shouldFallbackToApi: false,
shouldSubmitOrders: true,
metadataMsgBranding: 'Dexter',
};
const requestConfig: RequestConfig = {
timeout: 5000,
proxyUrl: '',
retries: 3,
};
const blockfrostConfig: BlockfrostConfig = {
url: 'https://cardano-mainnet.blockfrost.io/api/v0/',
projectId: '<< MY BLOCKFROST KEY >>',
};
const blockfrostAdapter = new BlockfrostProvider(
blockfrostConfig,
requestConfig
);
const lucidProvider = await new LucidProvider().loadWalletFromSeedPhrase(
seed, // MY SEED PHRASE
undefined,
blockfrostConfig
);
const dexter: Dexter = new Dexter(dexterConfig, requestConfig)
.withDataProvider(blockfrostAdapter)
.withWalletProvider(lucidProvider);
const liquidityPool = new LiquidityPool(
Minswap.name,
'lovelace',
new Asset(
'e16c2dc8ae937e8d3790c7fd7168d7b994621ba14ca11415f39fed72',
'4d494e'
),
10000000000000n,
100000000000000n,
'addr1'
);
const swapRequest: SwapRequest = dexter
.newSwapRequest()
.forLiquidityPool(liquidityPool)
.withSwapInToken('lovelace')
.withSwapInAmount(1000000n)
.withSlippagePercent(100);
const tx = swapRequest.submit(); |
Hmm that all looks fine.. I am wondering if the |
I just changed it to 1 and retried, but still get the same error. |
Very weird, I don't see how this could occur if everything works fine up to that point. And I would assume all users would have this issue by the looks of it. Ill take a look. |
this is my dependencies "dependencies": {
"@indigo-labs/dexter": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.17.9",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"babel-jest": "^28.0.1",
"esbuild": "^0.14.38",
"ts-node": "^10.7.0",
"typescript": "^4.6.3"
} And the lucid-cardano version is 0.8.9 |
I think I found the problem |
I was looking that over, and if the |
Transactions work fine for me if it helps, I use the default slippage though |
@ndtr2000 I think the issue is before the signing. I opened this PR #49 to allow those failures to bubble up so the real error isn't masked. Would you mind checking that PR out & seeing what error you actually get? Seems to be some edge case I haven't been able to replicate in my environment |
Sorry guys. I found the problem is that my wallet doesn't has enough lovelace. |
@ndtr2000 Appreciate you letting us know - we will work on better error handling & messages so the failures are more clear |
Hi, I'm running into the same issue. But I have enough lovelace in my wallet. `file:///Users/nick/code/lp-sniper/node_modules/@indigo-labs/dexter/build/providers/wallet/lucid-provider.js:95 TypeError: transaction.providerData.tx.sign is not a function
const submitted = swapRequest.submit(); logger.info(
|
Data Provider
Blockfrost
DEX
All
Description
I'm getting error
TypeError: transaction.providerData.tx.sign
is not a function when callswapRequest.submit
. even I set the lucid wallet provider to the dexterI found that,
transaction.providerData.tx
has type ofTx
in lucid-cardano, butTx
doesn't have any function named signThe text was updated successfully, but these errors were encountered: