-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FE] - UI for Create Product Form (#40)
Got most of the work done for the create product form, it's still very messy and i need to clean up all the code and separate them into smaller components to avoid a file with 1k+ lines of code but in the interest of time just pushing what i have so far to get feedback asap. this PR builds on top of your unmerged PR #35 @0x0ece --------- Co-authored-by: Emanuele Cesena <[email protected]>
- Loading branch information
Showing
17 changed files
with
1,595 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"version": "0.1.0", | ||
"name": "custody", | ||
"constants": [ | ||
{ | ||
"name": "SEED", | ||
"type": "string", | ||
"value": "\"anchor\"" | ||
} | ||
], | ||
"instructions": [ | ||
{ | ||
"name": "initialize", | ||
"accounts": [], | ||
"args": [] | ||
} | ||
], | ||
"errors": [ | ||
{ | ||
"code": 6000, | ||
"name": "CustomError", | ||
"msg": "Custom error message" | ||
} | ||
], | ||
"metadata": { | ||
"address": "Gcu1vbed9bwpfwU9PCnJw8QanQfVHfETWxAK3EZczbgo" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"version": "0.1.0", | ||
"name": "policy", | ||
"constants": [ | ||
{ | ||
"name": "SEED", | ||
"type": "string", | ||
"value": "\"anchor\"" | ||
} | ||
], | ||
"instructions": [ | ||
{ | ||
"name": "transferHook", | ||
"accounts": [ | ||
{ | ||
"name": "sourceToken", | ||
"isMut": false, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "mint", | ||
"isMut": false, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "destinationToken", | ||
"isMut": false, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "owner", | ||
"isMut": false, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "extraAccountMetaList", | ||
"isMut": false, | ||
"isSigner": false | ||
} | ||
], | ||
"args": [ | ||
{ | ||
"name": "amount", | ||
"type": "u64" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "initializeExtraAccountMetaList", | ||
"accounts": [ | ||
{ | ||
"name": "payer", | ||
"isMut": true, | ||
"isSigner": true | ||
}, | ||
{ | ||
"name": "extraAccountMetaList", | ||
"isMut": true, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "mint", | ||
"isMut": false, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "tokenProgram", | ||
"isMut": false, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "associatedTokenProgram", | ||
"isMut": false, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "systemProgram", | ||
"isMut": false, | ||
"isSigner": false | ||
} | ||
], | ||
"args": [] | ||
} | ||
], | ||
"errors": [ | ||
{ | ||
"code": 6000, | ||
"name": "AmountTooBig", | ||
"msg": "Amount too big" | ||
} | ||
], | ||
"metadata": { | ||
"address": "Gpo1jXtEFepqyPQWTG7oDJrg8rye8JL3zcsczHzXKqLt" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"version": "0.1.0", | ||
"name": "pricing", | ||
"constants": [ | ||
{ | ||
"name": "SEED", | ||
"type": "string", | ||
"value": "\"anchor\"" | ||
} | ||
], | ||
"instructions": [ | ||
{ | ||
"name": "initialize", | ||
"accounts": [], | ||
"args": [] | ||
}, | ||
{ | ||
"name": "payUsd", | ||
"accounts": [ | ||
{ | ||
"name": "from", | ||
"isMut": false, | ||
"isSigner": true | ||
}, | ||
{ | ||
"name": "to", | ||
"isMut": true, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "solUsdPriceAccount", | ||
"isMut": false, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "systemProgram", | ||
"isMut": false, | ||
"isSigner": false | ||
} | ||
], | ||
"args": [ | ||
{ | ||
"name": "amount", | ||
"type": "u64" | ||
} | ||
] | ||
} | ||
], | ||
"errors": [ | ||
{ | ||
"code": 6000, | ||
"name": "PriceUnavailable", | ||
"msg": "Price is currently not available" | ||
}, | ||
{ | ||
"code": 6001, | ||
"name": "InvalidPriceFeedId", | ||
"msg": "Invalid price feed id" | ||
} | ||
], | ||
"metadata": { | ||
"address": "Gpr1WZZXAty2L9eiMwZPC7ra69vMFojhdqDuiRHkQQQp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"version": "0.1.0", | ||
"name": "strategy", | ||
"constants": [ | ||
{ | ||
"name": "SEED", | ||
"type": "string", | ||
"value": "\"anchor\"" | ||
} | ||
], | ||
"instructions": [ | ||
{ | ||
"name": "initialize", | ||
"accounts": [], | ||
"args": [] | ||
} | ||
], | ||
"errors": [ | ||
{ | ||
"code": 6000, | ||
"name": "CustomError", | ||
"msg": "Custom error message" | ||
} | ||
], | ||
"metadata": { | ||
"address": "Gst1YGe5vKURSWfCqM7GhZys1oML9E9t91WRyV2rt4yS" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
export type Custody = { | ||
"version": "0.1.0", | ||
"name": "custody", | ||
"constants": [ | ||
{ | ||
"name": "SEED", | ||
"type": "string", | ||
"value": "\"anchor\"" | ||
} | ||
], | ||
"instructions": [ | ||
{ | ||
"name": "initialize", | ||
"accounts": [], | ||
"args": [] | ||
} | ||
], | ||
"errors": [ | ||
{ | ||
"code": 6000, | ||
"name": "CustomError", | ||
"msg": "Custom error message" | ||
} | ||
] | ||
}; | ||
|
||
export const IDL: Custody = { | ||
"version": "0.1.0", | ||
"name": "custody", | ||
"constants": [ | ||
{ | ||
"name": "SEED", | ||
"type": "string", | ||
"value": "\"anchor\"" | ||
} | ||
], | ||
"instructions": [ | ||
{ | ||
"name": "initialize", | ||
"accounts": [], | ||
"args": [] | ||
} | ||
], | ||
"errors": [ | ||
{ | ||
"code": 6000, | ||
"name": "CustomError", | ||
"msg": "Custom error message" | ||
} | ||
] | ||
}; |
Oops, something went wrong.