fix cancel in oracle creator
This commit is contained in:
parent
6ccd3caa37
commit
c21ffd2d14
|
@ -436,6 +436,7 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
|
|||
targetAmount: number,
|
||||
tokenMint: PublicKey,
|
||||
) => {
|
||||
setIsSolPool(false)
|
||||
const swaps = await handleGetRoutesWithFixedArgs(
|
||||
targetAmount ? targetAmount : 100,
|
||||
tokenMint,
|
||||
|
@ -530,6 +531,7 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
|
|||
setProposedProposedTargetAmount(0)
|
||||
setBaseTokenPrice(0)
|
||||
setIsLST(false)
|
||||
setIsSolPool(false)
|
||||
}
|
||||
|
||||
const isFormValid = useCallback(
|
||||
|
|
|
@ -216,6 +216,74 @@ const CreateSwitchboardOracleModal = ({
|
|||
if (!settingFromLib) {
|
||||
throw wrongTierPassedForCreation
|
||||
}
|
||||
console.log(
|
||||
OracleJob.fromObject({
|
||||
tasks: [
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
valueTask: {
|
||||
big: swapValue,
|
||||
},
|
||||
},
|
||||
{
|
||||
divideTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
jupiterSwapTask: {
|
||||
inTokenAddress: USDC_MINT,
|
||||
outTokenAddress: baseTokenPk,
|
||||
baseAmountString: swapValue,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: onFailureTaskDesc,
|
||||
},
|
||||
},
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
pythAddress: pythUsdOracle,
|
||||
pythAllowedConfidenceInterval: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
switchboardAddress: switchboardUsdDaoOracle,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}).toJSON(),
|
||||
)
|
||||
const [aggregatorAccount, txArray1] =
|
||||
await queueAccount.createFeedInstructions(payer, {
|
||||
name: `${baseTokenName}/${quoteTokenName}`,
|
||||
|
|
Loading…
Reference in New Issue