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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user