Enhance Privy integration by adding getWalletIdFromAddress function to retrieve wallet IDs directly from addresses. Update callContract and related methods to utilize the new function for improved transaction handling. Modify tests to reflect changes in wallet address handling and ensure accurate position management.

This commit is contained in:
2025-12-30 03:02:23 +07:00
parent 274effc749
commit 95e60108af
5 changed files with 75 additions and 27 deletions

View File

@@ -8,18 +8,18 @@ describe('swap tokens implementation', () => {
it('should swap SOL to USDC successfully', async () => {
try {
const testAccount = '0x932167388dD9aad41149b3cA23eBD489E2E2DD78'
const sdk = await getClientForAddress(testAccount)
console.log('Account', sdk.account)
const result = await swapGmxTokensImpl(
sdk,
Ticker.USDC,
Ticker.SOL,
3,
'market',
undefined,
0.5
)
const result = await swapGmxTokensImpl(
sdk,
Ticker.SOL,
Ticker.USDC,
0.0495,
'market',
undefined,
0.5
)
assert.strictEqual(typeof result, 'string')
assert.strictEqual(result, 'swap_order_created')