Allow recipient account address to be off the curve
This commit is contained in:
parent
2b7d120887
commit
8f0a727373
@ -5,6 +5,7 @@ import assert from 'assert';
|
||||
|
||||
import { GasPrice } from '@cosmjs/stargate';
|
||||
import { Connection } from '@solana/web3.js';
|
||||
import { DENOM as ALNT_DENOM } from '@cerc-io/registry-sdk';
|
||||
|
||||
import { verifyUnusedSolanaPayment } from '@/utils/solanaVerify';
|
||||
import { transferLNTTokens } from '@/services/laconicTransfer';
|
||||
@ -153,6 +154,8 @@ export async function POST(request: NextRequest) {
|
||||
}, { status: 400 });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
return NextResponse.json({
|
||||
status: 'error',
|
||||
message: 'Invalid JSON in request body'
|
||||
@ -266,7 +269,7 @@ export async function POST(request: NextRequest) {
|
||||
const deployerLrn = process.env.DEPLOYER_LRN!;
|
||||
|
||||
// Create Registry client instance
|
||||
const gasPrice = GasPrice.fromString(config.fee.gasPrice);
|
||||
const gasPrice = GasPrice.fromString(config.fee.gasPrice + ALNT_DENOM);
|
||||
console.log('Using manual gas price:', gasPrice);
|
||||
|
||||
const registry = getRegistry()
|
||||
|
@ -131,7 +131,7 @@ export default function StatusDisplay({
|
||||
{lrn && <InfoItem label="Laconic Resource Name (LRN)" value={lrn} />}
|
||||
{dns && (
|
||||
domainSuffix
|
||||
? <InfoItem label="Deployment URL (ready in 2-3 minutes)" value={`https://${dns}${domainSuffix}`} />
|
||||
? <InfoItem label="Deployment URL (ready in 2-3 minutes)" value={`https://${dns}.${domainSuffix}`} />
|
||||
: <InfoItem label="Please set domain suffix" value="" />
|
||||
)}
|
||||
</div>
|
||||
|
@ -41,7 +41,7 @@ export const transferLNTTokens = async (): Promise<LaconicTransferResult> => {
|
||||
|
||||
// Find the paymentAddress attribute
|
||||
const paymentAddress = deployerRecord.attributes.paymentAddress
|
||||
const deployerMinPayment = deployerRecord.attributes.minimumPayment
|
||||
const deployerMinPayment = (deployerRecord.attributes.minimumPayment as string).split(ALNT_DENOM)[0]
|
||||
|
||||
console.log('Found payment address:', paymentAddress);
|
||||
console.log('Found minimum payment:', deployerMinPayment);
|
||||
|
@ -89,7 +89,9 @@ export const verifyUnusedSolanaPayment = async (
|
||||
|
||||
const expectedTokenAccount = getAssociatedTokenAddressSync(
|
||||
new PublicKey(process.env.NEXT_PUBLIC_SOLANA_TOKEN_MINT_ADDRESS!),
|
||||
new PublicKey(process.env.NEXT_PUBLIC_SOLANA_TOKEN_RECIPIENT_ADDRESS!)
|
||||
new PublicKey(process.env.NEXT_PUBLIC_SOLANA_TOKEN_RECIPIENT_ADDRESS!),
|
||||
// Allow recipient account address to be off the curve (i.e now having a private key)
|
||||
true
|
||||
);
|
||||
|
||||
// Verify recipient address by checking the transaction instructions
|
||||
|
Loading…
Reference in New Issue
Block a user