Skip to content

Commit 4d8f43d

Browse files
authored
Merge pull request #4867 from brave-intl/remove-logging
Remove logging
2 parents f88ebc1 + 863fb32 commit 4d8f43d

File tree

2 files changed

+22
-29
lines changed

2 files changed

+22
-29
lines changed

app/jobs/cache/browser_channels/responses_for_prefix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def get_site_banner_details(site_banner_lookup)
161161

162162
public_id = site_banner_lookup.channel.public_identifier
163163
include_web3 = (site_banner_lookup.channel.crypto_address_for_channels.length > 0) && public_id
164-
details.web3_url = include_web3 ? "https://#{ENV["CREATORS_HOST"]}/c/#{public_id}" : ""
164+
details.web3_url = include_web3 ? "#{ENV["CREATORS_HOST"]}/c/#{public_id}" : ""
165165

166166
if site_banner_lookup.derived_site_banner_info["socialLinks"].present?
167167
social_links_pb = nil

nextjs/src/app/[locale]/c/[public_identifier]/CryptoWidgetPaymentButton.jsx

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -191,36 +191,31 @@ export default function CryptoWidgetPaymentButton({
191191
} else {
192192
const provider = await window.solana.connect();
193193
if (provider.publicKey) {
194+
const pub_key = provider.publicKey;
195+
const connection = new Connection(`${rpcHost}/rpc`);
196+
const amount = Math.round(currentAmount * LAMPORTS_PER_SOL);
197+
198+
const transaction = new Transaction().add(
199+
SystemProgram.transfer({
200+
fromPubkey: pub_key,
201+
toPubkey: addresses.SOL,
202+
lamports: amount,
203+
}),
204+
);
205+
transaction.feePayer = pub_key;
206+
const blockhashObj = await connection.getLatestBlockhash("confirmed");
207+
transaction.recentBlockhash = await blockhashObj.blockhash;
208+
194209
try {
195-
const pub_key = provider.publicKey;
196-
const connection = new Connection(`${rpcHost}/rpc`);
197-
console.log(connection)
198-
const amount = Math.round(currentAmount * LAMPORTS_PER_SOL);
199-
200-
const transaction = new Transaction().add(
201-
SystemProgram.transfer({
202-
fromPubkey: pub_key,
203-
toPubkey: addresses.SOL,
204-
lamports: amount,
205-
}),
206-
);
207-
transaction.feePayer = pub_key;
208-
const blockhashObj = await connection.getLatestBlockhash("confirmed");
209-
transaction.recentBlockhash = await blockhashObj.blockhash;
210-
211-
try {
212-
const result =
213-
await window.solana.signAndSendTransaction(transaction);
214-
if (result.signature) {
215-
window.solana.disconnect();
216-
setIsSuccessView(true);
217-
}
218-
} catch (e) {
219-
setGenericError();
210+
const result =
211+
await window.solana.signAndSendTransaction(transaction);
212+
if (result.signature) {
220213
window.solana.disconnect();
214+
setIsSuccessView(true);
221215
}
222216
} catch (e) {
223-
console.log(e)
217+
setGenericError();
218+
window.solana.disconnect();
224219
}
225220
} else {
226221
setGenericError();
@@ -246,7 +241,6 @@ export default function CryptoWidgetPaymentButton({
246241
// this is the account address that will receive bat
247242
const destinationAccountOwner = new PublicKey(addresses.SOL);
248243
const connection = new Connection(`${rpcHost}/rpc`);
249-
console.log(connection)
250244
const contract = new PublicKey(contractAddress);
251245
// Check to see if the sender has an associated token account
252246
const senderAccount = await connection.getParsedTokenAccountsByOwner(
@@ -319,7 +313,6 @@ export default function CryptoWidgetPaymentButton({
319313
return;
320314
}
321315
} catch (e) {
322-
console.log(e)
323316
setGenericError();
324317
window.solana.disconnect();
325318
}

0 commit comments

Comments
 (0)