Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor-Salomon committed Jan 22, 2025
1 parent d6965bc commit d17e950
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions app/src/utils/ocelloids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,15 @@ enum xcmNotificationType {
Bridge = 'xcm.bridge',
}

// const OCELLOIDS_API_KEY = process.env.NEXT_PUBLIC_OC_API_KEY_READ_WRITE || ''
const OCELLOIDS_API_KEY =
'eyJhbGciOiJFZERTQSIsImtpZCI6IklSU1FYWXNUc0pQTm9kTTJsNURrbkJsWkJNTms2SUNvc0xBRi16dlVYX289In0.ewogICJpc3MiOiAiZGV2LWFwaS5vY2VsbG9pZHMubmV0IiwKICAianRpIjogIjAxMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwIiwKICAic3ViIjogInB1YmxpY0BvY2VsbG9pZHMiCn0K.bjjQYsdIN9Fx34S9Of5QSKxb8_aOtwURInOGSSc_DxrdZcnYWi-5nnZsh1v5rYWuRWNzLstX0h1ICSH_oAugAQ'
const OCELLOIDS_API_KEY = process.env.NEXT_PUBLIC_OC_API_KEY_READ_WRITE || ''

// Helper to filter the subscribable transfers only
export const getSubscribableTransfers = (transfers: StoredTransfer[]) =>
transfers.filter(t => resolveDirection(t.sourceChain, t.destChain) === Direction.WithinPolkadot)

export const initOcelloidsClient = () => {
if (!OCELLOIDS_API_KEY) throw new Error('OCELLOIDS_API_KEY is undefined')
// return new OcelloidsClient({
// apiKey: OCELLOIDS_API_KEY,
// })
return new OcelloidsClient({
httpUrl: 'https://dev-api.ocelloids.net',
wsUrl: 'wss://dev-api.ocelloids.net',
apiKey: OCELLOIDS_API_KEY,
})
}
Expand Down Expand Up @@ -100,7 +93,6 @@ export const xcmOcceloidsSubscribe = async (
waypoint,
destination,
} = msg.payload
console.log('event', type, msg.payload)
const eventTxHash = getTxHashFromEvent(event, sourceChain.chainId, extrinsicHash)

if (eventTxHash === txHash) {
Expand Down

0 comments on commit d17e950

Please sign in to comment.