Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ REACT_APP_INFURA_IPFS_PROJECT_ID=
REACT_APP_INFURA_IPFS_PROJECT_SECRET=

# A Biconomy API key can be set here, to allow meta transactions in the widgets
REACT_APP_META_TX_API_KEY_MAP={"testing-80001-0":"xxxxxx", "testing-5-0":"xxxxxx"}
REACT_APP_META_TX_API_KEY_MAP={"testing-80002-0":"xxxxxx", "testing-5-0":"xxxxxx"}

# Biconomy API ids can be set here, to allow meta transactions to the protocol contracts
# As each contracts needs its own AipId, we need to consider protocol, and all supported ERC20 tokens
Comment thread
levalleux-ludo marked this conversation as resolved.
Outdated
REACT_APP_META_TX_API_IDS_MAP={"testing-80001-0":{"protocol": "xxxxxx", "BOSON": "yyyyyy", "WETH": "zzzzzz"}, "testing-5-0":{"protocol": "xxxxxx", "BOSON": "yyyyyy", "WETH": "zzzzzz"}}
REACT_APP_META_TX_API_IDS_MAP={"testing-80002-0":{"protocol": "xxxxxx", "BOSON": "yyyyyy", "WETH": "zzzzzz", "forwarder": "tttttt"}, "testing-5-0":{"protocol": "xxxxxx", "BOSON": "yyyyyy", "WETH": "zzzzzz", "forwarder": "tttttt"}}

# Meta-transactions Gateway URL (ex: "https://api.biconomy.io")
REACT_APP_META_TX_RELAYER_URL=
Expand Down
62 changes: 18 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"dependencies": {
"@apollo/client": "^3.8.1",
"@bosonprotocol/chat-sdk": "^1.4.5",
"@bosonprotocol/common": "^1.32.0-alpha.6",
"@bosonprotocol/react-kit": "^0.42.0-alpha.0",
"@bosonprotocol/common": "^1.32.1-alpha.1",
"@bosonprotocol/react-kit": "^0.42.0-alpha.2",
"@davatar/react": "^1.10.4",
"@ethersproject/address": "^5.6.1",
"@ethersproject/units": "^5.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ export const PremintVouchersModal: React.FC<PremintVouchersModalProps> = ({
}}
offerId={offerId || ""}
amount={values?.premintQuantity || 0}
metaTxApiId={
config.metaTx
? config.metaTx.apiIds?.["FORWARDER"]?.["FORWARD"]
: undefined
}
onPendingSignature={() => {
setLoading(true);
}}
Expand Down
3 changes: 3 additions & 0 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ function getMetaTxApiIds(envConfig: ProtocolConfig) {
if (key.toLowerCase() === "protocol") {
apiIds[protocolAddress.toLowerCase()] = {};
apiIds[protocolAddress.toLowerCase()][method] = apiIdsInput[key];
} else if (key.toLowerCase() === "forwarder") {
apiIds["FORWARDER"] = {};
apiIds["FORWARDER"]["FORWARD"] = apiIdsInput[key];
} else {
const token = tokens.find(
(t: Token) => t.symbol.toLowerCase() === key.toLowerCase()
Expand Down
Loading