@flipflop-sdk/tools
Version:
[](https://deepwiki.com/flipflop-fun/sdk) [](https://badge.fury.io/js/%40flipflop-sdk%2Ftools) [ • 24.5 kB
JavaScript
"use strict";
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(require("react"));
var anchor = _interopRequireWildcard(require("@coral-xyz/anchor"));
var _fair_mint_token_devnet = _interopRequireDefault(require("./idl/fair_mint_token_devnet.json"));
var _fair_mint_token_mainnet = _interopRequireDefault(require("./idl/fair_mint_token_mainnet.json"));
var _styles = require("./types/styles");
var _config = require("./config");
var _splToken = require("@solana/spl-token");
var _web = require("@solana/web3.js");
var _web2 = require("./utils/web3");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var RefundButton = function RefundButton(_ref) {
var network = _ref.network,
mintAddress = _ref.mintAddress,
buttonStyle = _ref.buttonStyle,
informationStyle = _ref.informationStyle,
buttonTitle = _ref.buttonTitle,
wallet = _ref.wallet,
connection = _ref.connection,
tokenInfo = _ref.tokenInfo,
onStart = _ref.onStart,
onError = _ref.onError,
onSuccess = _ref.onSuccess;
var _React$useState = _react["default"].useState("0"),
_React$useState2 = _slicedToArray(_React$useState, 2),
burnTokens = _React$useState2[0],
setBurnTokens = _React$useState2[1];
(0, _react.useEffect)(function () {
getTokenInfo();
}, [mintAddress]);
var getTokenInfo = /*#__PURE__*/function () {
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var userTokenAccount, tokenAccountInfo, tokenBalance;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!(!mintAddress || !(wallet !== null && wallet !== void 0 && wallet.publicKey))) {
_context.next = 2;
break;
}
return _context.abrupt("return");
case 2:
_context.prev = 2;
_context.next = 5;
return (0, _splToken.getAssociatedTokenAddress)(new _web.PublicKey(mintAddress), wallet.publicKey, false, _splToken.TOKEN_PROGRAM_ID);
case 5:
userTokenAccount = _context.sent;
_context.next = 8;
return connection.getAccountInfo(userTokenAccount);
case 8:
tokenAccountInfo = _context.sent;
if (!tokenAccountInfo) {
_context.next = 16;
break;
}
_context.next = 12;
return connection.getTokenAccountBalance(userTokenAccount);
case 12:
tokenBalance = _context.sent;
setBurnTokens(tokenBalance.value.uiAmountString || "0");
_context.next = 18;
break;
case 16:
onError === null || onError === void 0 || onError('Token account does not exist');
setBurnTokens("0");
case 18:
_context.next = 23;
break;
case 20:
_context.prev = 20;
_context.t0 = _context["catch"](2);
onError === null || onError === void 0 || onError('Error getting token account');
case 23:
case "end":
return _context.stop();
}
}, _callee, null, [[2, 20]]);
}));
return function getTokenInfo() {
return _ref2.apply(this, arguments);
};
}();
var refund = /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var provider, program, _mintAccount, _systemConfigAccount, _systemConfigData, _protocolFeeAccount, _mintAddress, _configAccount, _refundAccount, refundAccountData, tokenAta, payerWsolAta, protocolWsolAta, wsolVaultAta, tokenVaultAta, refundAccounts, instructionRefund, tx, payerWsolAtaData, protocolWsolAtaData, result, _result$data;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
onStart === null || onStart === void 0 || onStart();
if (wallet) {
_context2.next = 4;
break;
}
onError === null || onError === void 0 || onError('Wallet is not connected');
return _context2.abrupt("return");
case 4:
provider = new anchor.AnchorProvider(connection, wallet, {
commitment: 'confirmed'
});
if (!(!mintAddress || mintAddress === '')) {
_context2.next = 8;
break;
}
onError === null || onError === void 0 || onError('Mint address is not provided');
return _context2.abrupt("return");
case 8:
program = network === "devnet" ? new anchor.Program(_fair_mint_token_devnet["default"], provider) : new anchor.Program(_fair_mint_token_mainnet["default"], provider);
if (provider.wallet) {
_context2.next = 12;
break;
}
onError === null || onError === void 0 || onError('Wallet is not connected');
return _context2.abrupt("return");
case 12:
_mintAccount = (0, _web2.mintAccount)(program, tokenInfo.tokenName, tokenInfo.tokenSymbol);
if (!(_mintAccount.toBase58() !== mintAddress)) {
_context2.next = 16;
break;
}
onError === null || onError === void 0 || onError('Mint address is not correct');
return _context2.abrupt("return");
case 16:
_systemConfigAccount = (0, _web2.systemConfigAccount)(program, new _web.PublicKey(_config.NETWORK_CONFIGS[network].systemDeployer));
_context2.next = 19;
return program.account.systemConfigData.fetch(_systemConfigAccount);
case 19:
_systemConfigData = _context2.sent;
_protocolFeeAccount = _systemConfigData.protocolFeeAccount;
_mintAddress = new _web.PublicKey(mintAddress);
_configAccount = (0, _web2.configAccount)(program, _mintAddress);
_refundAccount = (0, _web2.refundAccountPda)(program, _mintAddress, wallet.publicKey);
_context2.next = 26;
return program.account.tokenRefundData.fetch(_refundAccount);
case 26:
refundAccountData = _context2.sent;
if (!(refundAccountData.owner.toBase58() !== wallet.publicKey.toBase58())) {
_context2.next = 29;
break;
}
return _context2.abrupt("return", {
success: false,
message: 'Only User Account Allowed'
});
case 29:
_context2.next = 31;
return (0, _splToken.getAssociatedTokenAddress)(new _web.PublicKey(mintAddress), wallet.publicKey, false, _splToken.TOKEN_PROGRAM_ID);
case 31:
tokenAta = _context2.sent;
payerWsolAta = (0, _splToken.getAssociatedTokenAddressSync)(_splToken.NATIVE_MINT, wallet.publicKey, false, _splToken.TOKEN_PROGRAM_ID);
protocolWsolAta = (0, _splToken.getAssociatedTokenAddressSync)(_splToken.NATIVE_MINT, _protocolFeeAccount, false, _splToken.TOKEN_PROGRAM_ID);
_context2.next = 36;
return (0, _splToken.getAssociatedTokenAddress)(_splToken.NATIVE_MINT, new _web.PublicKey(_configAccount), true, _splToken.TOKEN_PROGRAM_ID);
case 36:
wsolVaultAta = _context2.sent;
_context2.next = 39;
return (0, _splToken.getAssociatedTokenAddress)(new _web.PublicKey(mintAddress), _configAccount, true, _splToken.TOKEN_PROGRAM_ID);
case 39:
tokenVaultAta = _context2.sent;
refundAccounts = {
mint: new _web.PublicKey(mintAddress),
refundAccount: _refundAccount,
configAccount: _configAccount,
tokenAta: tokenAta,
tokenVault: new _web.PublicKey(tokenVaultAta),
protocolFeeAccount: _protocolFeeAccount,
systemConfigAccount: _systemConfigAccount,
payer: wallet.publicKey,
wsolVault: wsolVaultAta,
payerWsolVault: payerWsolAta,
protocolWsolVault: protocolWsolAta,
tokenProgram: _splToken.TOKEN_PROGRAM_ID,
systemProgram: _web.SystemProgram.programId
};
_context2.next = 43;
return program.methods.refund(tokenInfo.tokenName, tokenInfo.tokenSymbol).accounts(refundAccounts).instruction();
case 43:
instructionRefund = _context2.sent;
_context2.prev = 44;
tx = new _web.Transaction();
_context2.next = 48;
return connection.getAccountInfo(payerWsolAta);
case 48:
payerWsolAtaData = _context2.sent;
// If payer has not received WSOL before and has no WSOL ata, create it
if (!payerWsolAtaData) tx.add((0, _splToken.createAssociatedTokenAccountInstruction)(wallet.publicKey, payerWsolAta, wallet.publicKey, _splToken.NATIVE_MINT, _splToken.TOKEN_PROGRAM_ID));
// If protocol account has not received WSOL before and has no WSOL ata, create it
_context2.next = 52;
return connection.getAccountInfo(protocolWsolAta);
case 52:
protocolWsolAtaData = _context2.sent;
if (!protocolWsolAtaData) tx.add((0, _splToken.createAssociatedTokenAccountInstruction)(wallet.publicKey, protocolWsolAta, _protocolFeeAccount, _splToken.NATIVE_MINT, _splToken.TOKEN_PROGRAM_ID));
// Add refund instruction
tx.add(instructionRefund);
// send transactions
_context2.next = 57;
return (0, _web2.processTransaction)(tx, connection, wallet, "Refund successfully", {
mint: mintAddress
});
case 57:
result = _context2.sent;
if (result && result.success) {
onSuccess === null || onSuccess === void 0 || onSuccess({
publicKey: wallet.publicKey.toBase58(),
tokenAccount: tokenAta.toBase58(),
wsolAccount: payerWsolAta.toBase58(),
tx: (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.tx,
tokenUrl: "".concat(_config.NETWORK_CONFIGS[network].frontendUrl, "/token/").concat(mintAddress)
});
} else {
onError === null || onError === void 0 || onError(result.message);
}
return _context2.abrupt("return");
case 62:
_context2.prev = 62;
_context2.t0 = _context2["catch"](44);
if (!_context2.t0.message.includes('Transaction simulation failed: This transaction has already been processed')) {
_context2.next = 67;
break;
}
onError === null || onError === void 0 || onError('Something went wrong but you have refund successfully');
return _context2.abrupt("return");
case 67:
onError === null || onError === void 0 || onError('Error refunding' + _context2.t0);
return _context2.abrupt("return");
case 69:
case "end":
return _context2.stop();
}
}, _callee2, null, [[44, 62]]);
}));
return function refund() {
return _ref3.apply(this, arguments);
};
}();
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
style: _objectSpread(_objectSpread({}, _styles.defaultInformationStyle), informationStyle)
}, /*#__PURE__*/_react["default"].createElement("div", {
style: {
marginRight: '2px'
}
}, "Burn ", burnTokens, " ", tokenInfo.tokenSymbol), /*#__PURE__*/_react["default"].createElement("a", {
href: "".concat(_config.NETWORK_CONFIGS[network].frontendUrl, "/token/").concat(mintAddress),
target: "_blank"
}, "[", tokenInfo.tokenName, "]")), /*#__PURE__*/_react["default"].createElement("div", {
style: _objectSpread(_objectSpread({}, _styles.defaultRefundButtonStyle), buttonStyle),
onClick: function onClick() {
return refund();
}
}, /*#__PURE__*/_react["default"].createElement("div", null, buttonTitle ? buttonTitle : "Refund")));
};
var _default = exports["default"] = RefundButton;